Kubernetes Services Troubleshooting

Luca Berton
7 min readOct 30, 2024

When troubleshooting Kubernetes issues related to containers, readiness, labels, and endpoints, it’s important to methodically inspect each aspect of your Pods and Services. Here’s a step-by-step guide for troubleshooting problems in the context of Pods being up, readiness status, labels, and service endpoints.

Step 1: Check if the Containers Are Up

The first step is to verify whether the Pods are running and that all containers within the Pods are up.

Command:

kubectl get pods

Example Output:

NAME                        READY   STATUS    RESTARTS   AGE
nginx-deployment-abc12 1/1 Running 0 10m
redis-deployment-xyz34 1/1 Running 0 12m

What to look for:

  • READY: This column indicates how many containers in the Pod are ready. 1/1 means the container is running and ready. If you see 0/1, 0/2, or a similar number, it means that one or more containers are not ready.
  • STATUS: This should be Running. If it shows Pending, CrashLoopBackOff, or another state, investigate further.

Common issues:

  • If the Pods are in a Pending state, it might indicate that…

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday