Pod status is stuck in Terminating state but replicationController and deployment got deleted. To solve this issues, please follow a commands below;
Errors
[ec2-user@ip-172-31-25-244 rajesh]$ kubectl get pods -n=ganesh
NAME READY STATUS RESTARTS AGE
hello-rc-4mtsv 0/1 Terminating 0 38m
hello-rc-84xtz 1/1 Terminating 0 43m
hello-rc-948gs 1/1 Terminating 0 43m
hello-rc-992lp 1/1 Terminating 0 43m
hello-rc-fdfjs 1/1 Terminating 0 39m
[ec2-user@ip-172-31-25-244 rajesh]$ kubectl get rc -n=ganesh
No resources found.
Solutions
You can use following command to delete the POD forcefully.
$ kubectl delete pod <PODNAME1> <PODNAME2> <PODNAME3> --grace-period=0 --force --n <NAMESPACE>
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
Please find my social handles as below;
Rajesh Kumar Personal Website
Rajesh Kumar at YOUTUBE
Rajesh Kumar at INSTAGRAM
Rajesh Kumar at X
Rajesh Kumar at FACEBOOK
Rajesh Kumar at LINKEDIN
Rajesh Kumar at PINTEREST
Rajesh Kumar at QUORA
Rajesh Kumar at WIZBRAND