Installation¶
Requirements¶
- kubectl 1.20+
- Kubernetes cluster 1.21+ (uses
batch/v1,apps/v1,core/v1,events.k8s.io/v1) - Krew (recommended install method)
Krew — recommended¶
kubectl-audit is published through the codenio Krew index.
kubectl krew index add codenio https://github.com/codenio/codenio-krew-index.git
kubectl krew install codenio/audit
Index name conflict
If the name codenio is already taken in your Krew config, choose any other name for the index add step:
Krew default index¶
If the plugin is listed in Krew's default index:
From source¶
Requires Go 1.21+ and make.
Builds bin/audit and copies it to ~/.krew/bin/kubectl-audit. Ensure ~/.krew/bin is on your PATH.
Verify¶
You should see the plugin's help output listing all subcommands.
Next: Quick Start →