Kubernetes
Kubernetes notes and cheatsheet
Special Use Cases
If you need too delete a pod, and can not wait for it to stop and terminate, you can force the delettions with the following:
kubectl delete pods -n <namespace> --grace-period=0 --force
Flags
--grace-period: Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when —force is true (force deletion).--force: Only used when grace-period=0. If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
General Troubleshooting
Below are a few basic general areas to look into when trying to debug a issues depending on what the problem is.
- Describe pod
- logs pod
- exec into pod to see whats going on