+2 votes
112 views
in Cloud by
One of my k8 pode stuck on containercreating status, no Idea how to resolve it, try reinitiated the

 kubeadm but no luck, still containercreating stuck

2 Answers

0 votes
by
 
Best answer
Check the logs, find the cause and fix it accordingly, you can refer below to find events
https://www.askocloud.com/index.php/92/how-to-check-kubernetes-event-logs
0 votes
by

If a container is stuck in the "ContainerCreating" status, it means that Kubernetes is having difficulty creating the container. This can happen for a variety of reasons, such as an issue with the container image, network connectivity problems, or resource constraints on the cluster. In order to troubleshoot this issue, you can check the Kubernetes event logs for more information about why the container is unable to be created. You may also need to check the status of other resources on the cluster, such as nodes, pods, and deployments, to see if there are any issues that could be impacting the ability to create the container.

If a container is stuck in the "ContainerCreating" status, you can try the following steps to fix the issue:

  1. Check the Kubernetes event logs for more information about why the container is unable to be created. This can help you identify the cause of the problem, such as an issue with the container image or network connectivity.
  2. Check the status of other resources on the cluster, such as nodes, pods, and deployments, to see if there are any issues that could be impacting the ability to create the container.
  3. If you are using a custom container image, make sure it is available and accessible to the Kubernetes cluster. This may involve checking the image registry and ensuring that the image is properly tagged and pushed.
  4. If you are using a managed Kubernetes service, such as Amazon EKS or Google Kubernetes Engine, check the service-specific logs and metrics for more information about why the container is unable to be created.
  5. If the issue persists, try scaling the cluster or increasing the resource allocation for the container to see if that helps resolve the issue.
  6. If all else fails, you can try restarting the Kubernetes pod or deployment in which the container is stuck in order to force it to be recreated. This may help reset the state and allow the container to be created successfully.
...