Pods get stucked in status 'ContainerCreating'
Two days a ago we created a new AKS cluster with Kubernetes 1.9.6 and internal VNET in WestEurope. We often now have the case that pods get sucked in Status 'ContainerCreating'. Any idea?
You need to check the logs of the container itself, could be multiple reasons for not being able to start the container properly
There are no logs for pods present. What I could see were only two 'Events' in the Kubernetes Dashboard for Pod:
- 'Failed create pod sandbox.'
- 'Pod sandbox changed, it will be killed and re-created.'
But the the pod was never recreated. I deleted the pod after 4 hours.
We have the same problem:
kubectl run nginx --image=nginx --port=80
kubectl expose deployment nginx --type=LoadBalancer
kubectl describe pod nginx
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 10m default-scheduler Successfully assigned nginx-7587c6fdb6-kc52r to aks-agentpool-88888888-8
Normal SuccessfulMountVolume 9m kubelet, aks-agentpool-88888888-8 MountVolume.SetUp succeeded for volume "default-token-8nnn4"
Warning FailedCreatePodSandBox 9m kubelet, aks-agentpool-88888888-8 Failed create pod sandbox.
Warning FailedSync 5m kubelet, aks-agentpool-88888888-8 error determining status: rpc error: code = DeadlineExceeded desc = context deadline exceeded
@AlexanderSchoenfeld @mirwais27 are all pods stuck creating, or just an occasional pod.
If you could check kubelet logs on the stuck node for any issues allocating Pod ips, that may be the source of trouble.
Hello, We also have massive problems with this:
kubectl describe pod jenkins-slave
[...]
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 6m default-scheduler Successfully assigned jenkins-slave-hcr7b-rnzx8 to aks-agentpool-17149307-0
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "workspace-volume"
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "volume-1"
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "volume-0"
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "volume-3"
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "volume-2"
Normal SuccessfulMountVolume 6m kubelet, aks-agentpool-17149307-0 MountVolume.SetUp succeeded for volume "default-token-gs645"
Normal SandboxChanged 5m (x9 over 5m) kubelet, aks-agentpool-17149307-0 Pod sandbox changed, it will be killed and re-created.
Warning FailedCreatePodSandBox 1m (x145 over 5m) kubelet, aks-agentpool-17149307-0 Failed create pod sandbox.
Unfortunately we do not have the possibility to check the kubelet logs to get more information.
One additional info: After a few minutes, it heals itself.
Same problem here, what should we do to solve the "Failed create pod sandbox." error? How to get more log information?
We also encountered this problem. All of our clusters were provisioned before GA. Anyone experienced the problem with a post-GA cluster?
There can be many reasons lead to this. Can you run:
kubectl describe
with pod name being the pod stuck at ContainerCreating stage. Error message will be printed at the bottom of the description of the pod.
We were hit with several of these errors today. Restarting the node seems to make the problem go away but that isn't a solution. Further errors/warnings:
"[microservice]" network: runtime error: invalid memory address or nil pointer dereference; goroutine 1 [running]: github.com/Azure/azure-container-networking/cni.(*Plugin).Execute.func1(0xc42019fec0) /go/src/github.com/Azure/azure-container-networking/cni/plugin.go:94 +0xbc panic(0x69b3c0, 0x83ed90) /usr/local/go/src/runtime/panic.go:489 +0x2cf
Same issue over here, zie attached file for describe of the pod. It is a new cluster with vmss & calico enabled. I depoyed the cluster with the flag no ssh key and with vmss instances you cannot reset the password/ key anymore in the portal. So no option right now to view the kubelet log of that specific node.
You can still add an ssh key to a node the way you would for a normal VM, it won't survive vm redeploy (eg some upgrades, scale events). https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/vmaccess or https://docs.microsoft.com/en-us/azure/virtual-machines/linux/login-using-aad (latter is covered in preview warnings; worst case you can never login and have to redeploy the vm; maybe ok if vm is fungible).
Closing as the original issue is stale
still an issue for me with kubernetes version 1.13.5 :/
Still an issue for me with EKS version v1.14.9-eks-502bfb...