Kubernetes: Deployment Is Not Creating Pods

Imagine the situation, when you are starting a Deployment of some application on a Kubernetes cluster by running, for example, the kubectl create deployment command.

Then you execute the kubectl get pods command to list the Pods, but it returns “No resource found“, that means the Deployment hasn’t created any Pods.

Below i will show you how to start troubleshooting when the Deployment is not creating the Pods on a Kubernetes cluster.

Cool Tip: How to increase a verbosity of the kubectl command! Read more →

Kubernetes: Deployment Is Not Creating Pods

Firstly, check if the Deployment has created the Pods:

$ kubectl get pods

If the command above returns at least the names of the Pods, check their logs:

$ kubectl logs <podName>

The message “No resource found“, means the Deployment hasn’t created Pods.

If no Pods are listed, execute the following command to check if the Deployment is ready:

$ kubectl get deployment

After checking the Deployment, check the Kubernetes events logs to get more details:

$ kubectl get events -w

Kubernetes events are automatically created when other resources have state changes, errors or other messages that should be broadcasted to the system, that is very helpful for debugging issues in the Kubernetes cluster.

In my particular case the events logs showed that the Deployment was failing to create the Pods, because of the improperly configured resource quotas, and this has been solved by adjusting the “ResourceQuota” object.

Cool Tip: Get Pod’s logs using the kubectl command! Read more →

Leave a Reply