search by tags

for the user

adventures into the land of the command line

k8s pods stuck in terminating state

some pods stuck in terminating state

★ kubectl get pods
NAME                                READY     STATUS        RESTARTS   AGE
mongodb-stuck-5598cbbcc-5tjzr       0/1       Terminating   0          17h
mongodb-stuck-5598cbbcc-bnsm8       0/1       Terminating   0          17h
mongodb-stuck-5598cbbcc-gfxvl       0/1       Terminating   0          18h
mongodb-stuck-5598cbbcc-qkwkw       0/1       Terminating   0          17h
mongodb-notstuck                    1/1       Running       1          82d
mongodb-notstuck                    1/1       Running       1          82d

delete that sucker

★ kubectl delete pod mongodb-analytics-5598cbbcc-5tjzr --grace-period=0 --force
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
pod "mongodb-analytics-5598cbbcc-5tjzr" deleted

et voila

★ kubectl get pods
NAME                                READY     STATUS        RESTARTS   AGE
mongodb-stuck-5598cbbcc-bnsm8       0/1       Terminating   0          17h
mongodb-stuck-5598cbbcc-gfxvl       0/1       Terminating   0          18h
mongodb-stuck-5598cbbcc-qkwkw       0/1       Terminating   0          17h
mongodb-notstuck                    1/1       Running       1          82d
mongodb-notstuck                    1/1       Running       1          82d