Diff live vs local

Show what would change if you applied this manifest now

kubectl diff -f file.yaml

tool
kubectl73 commands
tags
configdebug

More kubectl commands

  • kubectl get pods -n <ns> -l app=<label> -o name | xargs -I{} kubectl exec {} -n <ns> -- <cmd>

    Run a command in every pod matching a label selector

  • kubectl get pods -n <ns> -w

    Live-refresh pod list as statuses change

  • kubectl top pods -A --sort-by=cpu

    CPU-sorted pod usage across all namespaces

  • kubectl create token <sa-name> -n <ns> --duration=1h

    Generate a short-lived bound service account token

  • kubectl auth can-i --list -n <ns>

    Show all permissions the current user has in a namespace

all 73 kubectl commands