Quick Start¶
After installing, run your first audit:

Choose the right subcommand¶
| I want to… | Command |
|---|---|
| See all unhealthy pods | kubectl audit pods -A |
| Drill into a specific pod's containers | kubectl audit containers -p <pod-name> |
| Check which nodes can't schedule work | kubectl audit nodes |
| Find empty or stuck namespaces | kubectl audit ns |
| Find services with no backing pods | kubectl audit svc -A |
| Check deployment rollout health | kubectl audit deploy -A |
| Catch warning events cluster-wide | kubectl audit events -A |
| Check storage (PVC/PV) issues | kubectl audit pvc -A && kubectl audit pv |
pods vs containers
kubectl audit pods— one row per pod, aggregate statuskubectl audit containers— one row per container, shows exact image/restart detail
Start with pods for a quick count. Use containers when you need to identify which container inside a multi-container pod is broken.
Common workflows¶
Incident triage — cluster-wide sweep¶
Pre-deploy smoke check¶
kubectl audit pods -n my-namespace
kubectl audit deploy -n my-namespace
kubectl audit svc -n my-namespace
Scope to a team namespace with label filter¶
Try a demo (no broken cluster needed)¶
Each audit type has a demo manifest that creates intentionally broken resources:
Scripting and CI/CD¶
The audit summary is written to stderr, so stdout is clean for piping:
# Extract names of failing pods as JSON
kubectl audit pods -o json 2>/dev/null | jq '[.items[].metadata.name]'
# Non-zero exit if any unhealthy pods found
kubectl audit pods -n my-namespace -o name | grep -q . && echo "Issues found"
See the full CI/CD integration guide →
Next: RBAC & Permissions →