Subcommands Reference¶
Subcommand overview¶
| Subcommand | Aliases | Scope |
|---|---|---|
pods |
pod, po |
Namespaced |
containers |
container |
Namespaced |
nodes |
node, no |
Cluster-wide |
namespace |
namespaces, ns |
Cluster-wide |
pvc |
pvcs, persistentvolumeclaim, persistentvolumeclaims |
Namespaced |
pv |
pvs, persistentvolume, persistentvolumes |
Cluster-wide |
jobs |
job |
Namespaced |
cronjobs |
cronjob, cj |
Namespaced |
service |
services, svc |
Namespaced |
deploy |
deployment, deployments |
Namespaced |
events |
event, ev |
Namespaced |
For exact detection rules per subcommand, see Audit Rules.
pods¶
Lists pods that are not in a healthy steady state.
Flagged when: phase ≠ Running, any container not Ready, or restart count ≥ 5. Succeeded/Completed pods are included.
Default columns: NAME, READY, STATUS, RESTARTS, AGE
With -A: prepends NAMESPACE column (same as kubectl get pods -A)
containers¶
Per-container rows — finer detail than pods.
Flagged when: image pull errors, crash-loop waiting states, not ready, restart count ≥ 5, failed init containers.
Default columns: POD, NAME, READY, STATUS, RESTARTS, AGE, TYPE
With -o wide: adds PORTS, IMAGE, PULLPOLICY
pods vs containers
Use pods for a quick count. Use containers when you need to pinpoint which container inside a multi-container pod is broken.
nodes¶
Lists nodes that cannot be scheduled to.
Flagged when: NotReady or SchedulingDisabled (cordoned via kubectl cordon).
Nodes are cluster-scoped — -n and -A do not apply.
namespace¶
Lists namespaces that are stuck deleting or contain no workloads.
Aliases: namespaces, ns
Flagged when:
status.phase == Terminating(stuck deletion), or- the namespace has no workloads — none of: Pods, Deployments, StatefulSets, DaemonSets, ReplicaSets, Jobs, or CronJobs
ConfigMaps, Secrets, Services, and other non-workload objects alone do not prevent a namespace from being flagged as empty.
Namespaces are cluster-scoped — -n and -A do not apply. Use -l / --selector to filter the namespace list (for example kubectl audit ns -l team=platform).
pvc¶
Lists PersistentVolumeClaims not in Bound phase.
Flagged phases: Pending, Lost
pv¶
Lists PersistentVolumes not in Bound phase.
Flagged phases: Available, Released, Failed
PVs are cluster-scoped — -n and -A do not apply.
jobs¶
Lists failed Jobs.
Flagged when: status.failed > 0 (includes backoff limit reached, active deadline exceeded).
cronjobs¶
Lists suspended CronJobs.
Flagged when: spec.suspend = true
service¶
Lists Services whose selector matches no Pods.
Flagged when: non-empty spec.selector with no matching Pods in the namespace.
Skipped: type: ExternalName, empty selectors.
Note
-l/--selector filters the Service list. Pod matching always uses all Pods in the namespace.
deploy¶
Lists Deployments that are scaled down or have unhealthy replicas.
Flagged when: spec.replicas == 0, or readyReplicas < desired when desired > 0.
desired defaults to 1 when spec.replicas is unset (matches Kubernetes API default).
events¶
Lists Warning events.
Flagged when: type = Warning. Normal events are excluded.
Common flags¶
| Flag | Short | Applies to | Description |
|---|---|---|---|
--all-namespaces |
-A |
Namespaced targets | List across all namespaces |
--namespace |
-n |
Namespaced targets | Target namespace |
--selector |
-l |
All | Label selector (e.g., app=web) |
--output |
-o |
All | Output format (see Output Formats) |
--context |
All | Kubeconfig context override | |
--kubeconfig |
All | Path to kubeconfig file | |
--pod |
-p |
containers only |
Filter to a single pod by exact name |