Heapster status stuck in Container Creating or Pending status

9/17/2018

I am new to Kubernetes and started working with it from past one month. When creating the setup of cluster, sometimes I see that Heapster will be stuck in Container Creating or Pending status. After this happens the only way have found here is to re-install everything from the scratch which has solved our problem. Later if I run the Heapster it would run without any problem. But I think this is not the optimal solution every time. So please help out in solving the same issue when it occurs again. Heapster image is pulled from the github for our use. Right now the cluster is running fine, So could not send the screenshot of the heapster failing with it's status by staying in Container creating or Pending status. Suggest any alternative for the problem to be solved if it occurs again. Thanks in advance for your time.

-- Vivek Hegade M S
heapster
kubernetes
status

1 Answer

9/17/2018

A pod stuck in pending state can mean more than one thing. Next time it happens you should do 'kubectl get pods' and then 'kubectl describe pod '. However, since it works sometimes the most likely cause is that the cluster doesn't have enough resources on any of its nodes to schedule the pod. If the cluster is low on remaining resources you should get an indication of this by 'kubectl top nodes' and by 'kubectl describe nodes'. (Or with gke, if you are on google cloud, you often get a low resource warning in the web UI console.)

(Or if in Azure then be wary of https://github.com/Azure/ACS/issues/29 )

-- Ryan Dawson
Source: StackOverflow