question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle pods in Unknown state

See original GitHub issue

When 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:open
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
chicocvenanciocommented, Mar 25, 2019

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.

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.

Sounds good. I’ll try to start working on this next week.

1reaction
minrkcommented, Mar 25, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found