Create ServiceAccount token kubectl
Generate a short-lived bound service account token
kubectl create token <sa-name> -n <ns> --duration=1h
more kubectl
all 73 commands →
Check who can do what (audit)
kubectl auth can-i --list -n <ns>
Delete all pods in namespace
kubectl delete pods --all -n <ns>
Get ingress list
kubectl get ingress -A
Dump all pod YAML to file
kubectl get pods -n <ns> -o yaml > pods-dump.yaml
Jsonpath — all container images
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{"\n"}{end}{end}'