0

I have deployed a k8s service, however its not showing any pods. This is what I see

kubectl get deployments

enter image description here

It should create on the default namespace

kubectl get nodes (this shows me nothing)

enter image description here

How do I troubleshoot a failed deployment. The test-control-plane is the one deployed by kind this is the k8s one I'm using.

tmp dev
  • 8,043
  • 16
  • 53
  • 108

2 Answers2

0

kubectl get nodes

If above command is not showing anything which mean there is no Nodes in your cluster so where your workload will run ?

You need to have at least one worker node in K8s cluster so deployment can schedule the POD on it and run the application.

You can check worker node using same command

kubectl get nodes

You can debug more and check the reason of issue further using

kubectl describe deployment <name of your deployment>
Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
0

To find out what really went wrong, first follow the steps described in Harsh Manvar in his answer. Perhaps obtaining that information can help you find the problem. If not, check the logs of your deployment. Try to list your pods and see which ones did not boot properly, then check their logs.

You can also use the kubectl describe on pods to see in more detail what went wrong. Since you are using kind, I include a list of known errors for you.

You can also see this visual guide on troubleshooting Kubernetes deployments and 5 Tips for Troubleshooting Kubernetes Deployments.

Mikołaj Głodziak
  • 4,775
  • 7
  • 28