START
~$ kubectl get pods ~$ kubectl describe pod <pod-name> ~$ kubectl get pods -o wide
Are you hitting Are you
Is there any Is the cluster the mounting a Is the Pod There is an issue
PENDING Pod? ? YES full? ? NO ResourceQuota ? NO PENDING ? NO assigned to ? YES with the Kubelet
limits? PersistentVolu the Node
meClaim?
NO YES YES YES NO
Provision a bigger Relax the Fix the There is an issue The issue is with
cluster ResourceQuota PersistentVolume with the Scheduler the node-lifecycle
limits Claim controller
Are the Pods YES
RUNNING? ? NO ~$ kubectl logs <pod-name> ~$ kubectl describe pod <pod-name>
Consult Is there any
YES StackOverflow NO ? container
Is the Pod status Running?
Can you see Fix the issue in the
the logs for ? YES application
ImagePullBackOff? ? NO
the app? NO
NO YES Is the Pod status
RunContainerError? ?
Is the name of
Did the Fix the image
contaner died ? NO the image
correct? ? NO
NO name Is the Pod status
YES
too quickly? CrashLoopBackOff?
? NO
YES YES The issue is likely
to be with
YES mounting volumes
~$ kubectl logs <pod-name> --previous Is the image tag
valid? Does it ? NO
NO Fix the tag
exist? Did you inspect
the logs and fix ? NO Fix crashing app
Are the Pods the crashing
READY? ? NO ~$ kubectl describe pod <pod-name> YES app?
YES
YES Are you pulling Configure pulling
Is the images from a
Readiness ? YES Fix the Readiness private ? NO
YES images from a Did you forget
probe failing? probe registry? private registry the CMD
instruction in ? YES Fix the Dockerfile
NO NO the Dockerfile?
NO
The issue could be
Unknown state with the CRI or Is the Pod
Kubelet restarting
frequently? Fix the liveness
Cycling between ? YES probe
Running and
~$ kubectl port-forward <pod-name> 8080:<pod-port> Fix the app. It CrashLoopBackoff
should listen on ? NO
NO 0.0.0.0. Update the
Is the port
containerPort
Can you
?
exposed by
container correct ? Pods are Unknown state
access the
app?
NO and listening on running
YES
0.0.0.0?
YES
Unknown state correctly
~$ kubectl describe ingress <ingress-name> ~$ kubectl describe service <service-name>
NO Fix the ingress
Are the service.name and Fix the Service
Can you see a serviceName service.port.number Can you see a Is the Selector selector. It has to
list of Backends? ? NO and servicePort
matching the
? list of endpoints? ? NO matching the ? NO match the Pod
right Pod label? labels
Service?
YES YES YES YES
Does the Pod There is an issue
~$ kubectl port-forward <ingress-pod-name> 8080:<ingress-port> have an IP ? NO with the Controller
address manager
assigned?
The issue is specific YES
Can you visit the to the Ingress
app? ? NO controller. Consult the
docs for your Ingress. There is an issue
YES with the Kubelet
The Ingress is ~$ kubectl port-forward service/<service-name> 8080:<service-port>
running
correctly Can you visit the
NO Fix the Service
app? ? NO Is the targetPort
on the Service
targetPort and the
containerPort
matching the
containerPort in
?
The issue is likely YES the Pod? The issue could be
The app should to be with the YES with Kube Proxy
be working. Can ? NO infrastructure and
you visit it from how the cluster is
the public
internet? exposed. The Service is
YES running
correctly
END
https://learnk8s.io/troubleshooting-deployments