Diff live vs local kubectl
Show what would change if you applied this manifest now
kubectl diff -f file.yaml
more kubectl
all 73 commands →
Exec command in all pods
kubectl get pods -n <ns> -l app=<label> -o name | xargs -I{} kubectl exec {} -n <ns> -- <cmd>
Watch pod status changes
kubectl get pods -n <ns> -w
Top pods by CPU
kubectl top pods -A --sort-by=cpu
Create ServiceAccount token
kubectl create token <sa-name> -n <ns> --duration=1h
Check who can do what (audit)
kubectl auth can-i --list -n <ns>