Skip to content

kubectl-audit

Kubernetes cluster health, straight from your terminal.

kubectl krew install codenio/audit

kubectl-audit is a kubectl plugin that surfaces Kubernetes resources failing common health checks — without switching tools or writing custom scripts.

Use it for incident triage, SRE runbooks, pre-deploy smoke checks, and CI/CD gates.

kubectl audit pods — terminal demo

kubectl audit pods surfaces unhealthy pods with a summary line and attention table.


What it checks

Resource Flagged when…
Pods Phase ≠ Running, any container not Ready, or restart count ≥ 5
Containers Per-container: image pull errors, crash loops, not ready, high restarts
Nodes NotReady or SchedulingDisabled (cordoned)
Namespaces Terminating, or no workloads (Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, CronJobs)
PV / PVC Not in Bound phase (Pending, Lost, Released, Failed)
Jobs Failed — including backoff and deadline limit failures
CronJobs suspend: true
Services Non-empty selector with no matching Pods in the namespace
Deployments spec.replicas: 0, or readyReplicas < desired
Events type: Warning

See Audit Rules for exact detection thresholds.