Create a ServiceAccount token
Generates a short-lived bound token, here valid for 1 hour
kubectl create token <sa-name> -n <ns> --duration=1h
- tool
- kubectl73 commands
More kubectl commands
-
kubectl auth can-i --list -n <ns>Shows everything the current user can do in the namespace
-
kubectl delete pods --all -n <ns>Forces all pods to be recreated; handy after a ConfigMap change
-
kubectl get ingress -AAll Ingress resources with their hosts and addresses
-
kubectl get pods -n <ns> -o yaml > pods-dump.yamlSaves the full state of all pods in a namespace for backup or analysis
-
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{.metadata.name}{"\t"}{range .spec.containers[*]}{.image}{"\n"}{end}{end}'Shows every container image running in the cluster, with namespace and pod