Verify RBAC permissions kubectl
Check what a ServiceAccount is allowed to do
kubectl auth can-i list pods --as=system:serviceaccount:<ns>:<sa> -n <ns>
more kubectl
all 73 commands →
Get resource with custom columns
kubectl get pods -n <ns> -o custom-columns='NAME:.metadata.name,NODE:.spec.nodeName,STATUS:.status.phase'
Patch resource field
kubectl patch deployment <name> -n <ns> -p '{"spec":{"replicas":2}}'
Annotate resource
kubectl annotate pod <pod> -n <ns> key=value --overwrite
Label resource
kubectl label node <node> role=worker --overwrite
Add taint to node
kubectl taint nodes <node> key=value:NoSchedule