Handle pods in Unknown state
See original GitHub issueWhen nodes in a cluster misbehave, they sometimes leave pods in an Unknown state:
jupyter-user1 0/1 Unknown 0 3h 10.244.28.17 k8s-pool1-12345678-12
jupyter-user2 0/1 Unknown 1 5h 10.244.28.8 k8s-pool1-12345678-12
jupyter-user3 0/1 Unknown 1 4h 10.244.28.11 k8s-pool1-12345678-12
jupyter-user4 1/1 Unknown 0 6h <none> k8s-pool1-12345678-12
jupyter-user5 0/1 Unknown 0 3h 10.244.28.14 k8s-pool1-12345678-12
jupyter-user6 0/1 Unknown 1 3h 10.244.28.15 k8s-pool1-12345678-12
jupyter-user7 0/1 Unknown 1 4h 10.244.28.9 k8s-pool1-12345678-12
I can invoke delete
on the pods but they don’t actually go away. The pods are only cleared when the node has been rebooted – stopping the node is insufficient.
Can KubeSpawner work around this? Or should it even try, give that kubernetes seems to be at fault here?
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to delete a pod in Unknown state in Kubernetes?
You can force delete the pod like this: kubectl delete pod <pod_name> --grace-period=0 --force.
Read more >Pods stuck at 'Unknown' status after node goes down - Reddit
One thing I noticed, is that when a node goes down (and the cluster reports its status as 'NotReady'), its pods get stuck...
Read more >Not recognizing pods in an Unknown state #410 - GitHub
Hi, We had two pods in our cluster go into an unknown state however kube-state-metrics isn't recognizing this. See below: Output from curl ......
Read more >Pod in Unknown or Terminating state when OpenShift ...
Pods remain in Unknown or Terminating state when the OCP Node is abruptly stopped. pods stuck at Terminating state on failed nodes. Environment....
Read more >Pod Lifecycle | Kubernetes
That is, the container either exited with non-zero status or was terminated by the system. Unknown, For some reason the state of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds good. I’ll try to start working on this next week.
But because this is likely an issue with the cluster, deleting a pod that is Unknown should probably come with some extra warning output about the state of the pod before deleting it, to help with diagnostics.