Cloud Native 11 min read

Top 19 Kubernetes Service Issues and How to Fix Them

This guide compiles nineteen common Kubernetes problems—from certificate errors and service exposure failures to pod initialization issues and Helm installation errors—providing concise root‑cause analyses and step‑by‑step command solutions to help you quickly troubleshoot and resolve cluster disruptions.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Top 19 Kubernetes Service Issues and How to Fix Them

Common Kubernetes Issues and Resolutions

Problem 1: Service access failure due to unrecognizable certificate

Cause: Custom or expired certificate.

Solution: Update the certificate.

Problem 2: Service access failure caused by port mapping error

curl: (7) Failed connect to 10.103.22.158:3000; Connection refused

Cause: Service is running but port mapping is incorrect.

Solution: Delete the service and remap the port.

kubectl delete svc nginx-deployment

Problem 3: Service exposure failure (AlreadyExists)

Error from server (AlreadyExists): services "nginx-deployment" already exists

Cause: The service has already been created.

Solution: Delete the existing service and recreate it.

kubectl delete svc nginx-deployment

Problem 4: External access to ClusterIP service fails

Cause: Service type is ClusterIP, not exposed externally.

Solution: Change the service type to NodePort.

kubectl edit svc nginx-deployment

Problem 5: Pod status ErrImagePull

readiness-httpget-pod   0/1   ErrImagePull   0   10s

Cause: Image cannot be pulled.

Solution: Replace the image with a valid one.

Problem 6: Init container stuck in Init:0/2

NAME   READY   STATUS   RESTARTS   AGE
myapp-pod   0/1   Init:0/2   0   20s

Cause: Init container did not finish.

Error from server (BadRequest): container "myapp-container" in pod "myapp-pod" is waiting to start: PodInitializing

Solution: Ensure the init container completes successfully.

Problem 7: CrashLoopBackOff due to image issue

Cause: Faulty image causing container restart failures.

Solution: Replace the image with a working version.

Problem 8: Pod creation failure (Pending/ContainerCreating)

readiness-httpget-pod   0/1   Pending   0   0s
readiness-httpget-pod   0/1   ContainerCreating   0   0s
readiness-httpget-pod   0/1   CrashLoopBackOff   1   4s

Cause: Image problems prevent container start.

Solution: Use a correct image.

Problem 9: Pod ready state never reached

readiness-httpget-pod   0/1   Running   0   116s

Cause: Execution command in the pod fails, preventing resource acquisition.

Solution: Enter the container and create the required resources defined in the YAML.

Problem 10: Pod creation fails due to malformed YAML (Chinese characters)

Cause: Invalid characters in the YAML file.

Solution: Correct the myregistrykey entry.

Problem 11: kube-flannel pod stuck at Init:0/1

Cause: Image pull failure on the slave node.

Solution: Restart Docker on the slave node, manually pull the image, and reinstall the plugin on the master.

kubectl create -f kube-flannel.yml; kubectl get nodes

Problem 12: Service status ErrImagePull

kubectl describe pod test-nginx

Cause: Incorrect image name.

Solution: Delete the faulty pod and redeploy with the correct image.

kubectl delete pod test-nginx; kubectl run test-nginx --image=10.0.0.81:5000/nginx:alpine

Problem 13: Unable to exec into a specific container

Cause: Duplicate containers field in the YAML, causing the target container to be missing.

Solution: Remove the redundant containers entry and recreate the pod.

Problem 14: PersistentVolume creation failure

Cause: Duplicate PV name.

Solution: Change the PV name to a unique value.

Problem 15: PVC mount failure

Cause: Access mode mismatch between PVC and available PVs (requires >1Gi and RWO).

Solution: Adjust accessModes in the YAML or the PV definition.

Problem 16: Pod cannot access data on mounted PV

Cause: NFS volume is empty or permissions are incorrect.

Solution: Create files in the NFS volume and set appropriate permissions.

Problem 17: Node status check fails (missing heapster)

Error from server (NotFound): the server could not find the requested resource (get services http:heapster:)

Cause: Heapster service is not installed.

Solution: Install the Prometheus monitoring component.

Problem 18: Pods remain in Pending state

Cause: All nodes are occupied by pods using the same image, leaving no schedulable nodes.

Solution: Delete existing pods before deploying new ones.

Problem 19: Helm install fails due to missing Chart.yaml

# helm install
Error: This command needs 1 argument: chart name
# helm install ./
Error: no Chart.yaml exists in directory "/root/hello-world"

Cause: Incorrect chart file naming.

Solution: Rename chart.yaml to Chart.yaml.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

KubernetesClustertroubleshootingServicek8sPodhelm
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.