Force delete stuck pod kubectl
Remove a Terminating pod immediately (use with caution)
kubectl delete pod <name> -n <ns> --grace-period=0 --force
more kubectl
all 73 commands →
Copy file from pod
kubectl cp <ns>/<pod>:/remote/path ./local-path
Cordon a node
kubectl cordon <node>
Drain a node
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
Edit a live resource
kubectl edit deployment/<name> -n <ns>
Verify RBAC permissions
kubectl auth can-i list pods --as=system:serviceaccount:<ns>:<sa> -n <ns>