SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free🗺️ Learning Roadmaps
Blog/Kubernetes

Kubernetes Troubleshooting: The 10 Most Common Issues and Fixes

SynfraCore·May 2025·14 min read

Start Here Every Time

bash
kubectl get pods -n <namespace>
kubectl describe pod <pod-name> -n <ns>  # Events section has the answer 80% of the time
kubectl logs <pod-name> -n <ns>

1. CrashLoopBackOff

bash
kubectl logs my-pod --previous  # Logs from the crashed instance

Causes: app crashes at startup, liveness probe too aggressive, OOMKilled. The logs almost always show the exact error.

2. ImagePullBackOff

bash
kubectl describe pod my-pod  # Look in Events

Causes: image name typo, private registry without imagePullSecret, Docker Hub rate limit.

bash
kubectl create secret docker-registry regcred \
  --docker-server=registry.example.com \
  --docker-username=myuser --docker-password=mypassword

3. Pending Pod (Never Schedules)

bash
kubectl describe pod my-pod
# Look for: "0/3 nodes available: Insufficient memory"
# Or: "node affinity doesn't match"
kubectl describe nodes | grep -A 5 "Allocated resources"

4. OOMKilled

bash
kubectl describe pod my-pod  # Look for OOMKilled in Last State
# Fix: increase memory limit or fix memory leak
# resources:
#   limits: {memory: "512Mi"}  # was 256Mi

5. Service Not Reachable

bash
kubectl get endpoints my-service  # Empty = selector mismatch
kubectl describe service my-service  # Check Selector
kubectl get pod my-pod --show-labels  # Do labels match?

6-10 Quick Reference

Stuck Terminating: kubectl delete pod stuck-pod --force --grace-period=0

Node NotReady: SSH to node, sudo systemctl status kubelet && sudo journalctl -u kubelet -n 50

Deployment Not Rolling: kubectl rollout status deployment/my-deploy then check new pod logs

DNS Broken: kubectl run debug --image=busybox --rm -it -- nslookup kubernetes.default

High Restarts: kubectl logs my-pod --previous + check liveness probe initialDelaySeconds

Your Troubleshooting Cheatsheet

bash
# Cluster health
kubectl get nodes
kubectl get pods -A | grep -v Running | grep -v Completed
kubectl top nodes && kubectl top pods -A

# Events sorted by time
kubectl get events --sort-by=.lastTimestamp -n <namespace>

Found this useful? Share it:

Twitter / X LinkedIn WhatsApp Telegram

Weekly DevOps & Cloud digest

Every Sunday — tutorials, interview questions, tips, and what changed in DevOps and Cloud this week.

Join our Community
Daily tips, job alerts, interview help — join engineers learning together
← All articlesStart Learning Kubernetes
Kubernetes Troubleshooting: The 10 Most Common Issues and Fixes — Blog | SynfraCore