You are on page 1of 1

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 ? ? ? Is the Pod ?
PENDING Pod? ? YES full? NO the
ResourceQuota NO mounting a
PENDING NO assigned to YES There is an issue
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 ? NO YES
RUNNING? ~$ kubectl logs <pod-name> ~$ kubectl describe pod <pod-name>
Is there any
YES
Consult
StackOverflow NO ? container
Running?
Can you see Is the Pod status
the logs for ? YES Fix the issue in the
application
ImagePullBackOff? ? NO
the app? NO
NO YES Is the Pod status

RunContainerError? ?
Did the Is the name of Fix the image
contaner died ? NO the image
correct? ? NO name Is the Pod status

CrashLoopBackOff? YES
too quickly?
? NO
The issue is likely
YES YES
to be with
YES mounting volumes
~$ kubectl logs <pod-name> --previous Is the image tag
valid? Does it
exist? ? NO Fix the tag Did you inspect
Are the Pods
the logs and fix
the crashing ? NO Fix crashing app
READY? ? NO ~$ kubectl describe pod <pod-name> YES app?
YES
YES Are you pulling Configure pulling
Is the
Readiness ? YES Fix the Readiness
probe
images from a
private ? YES images from a
private registry Did you forget
probe failing? registry? the CMD ? YES Fix the Dockerfile
instruction in
NO NO the Dockerfile?
The issue could be NO
Unknown state with the CRI or Is the Pod
Kubelet restarting
frequently?
Cycling between ? YES Fix the liveness
probe
Running and
~$ kubectl port-forward <pod-name> 8080:<pod-port> Fix the app. It CrashLoopBackoff
should listen on ? NO
Is the port NO 0.0.0.0. Update the
Can you
access the ? NO
exposed by
container correct
and listening on ?
containerPort
Pods are
running
Unknown state
app?
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 serviceName and Fix the Service
Can you see a serviceName servicePort Can you see a Is the Selector
list of Backends? ? NO and servicePort
matching the ? list of endpoints? ? NO matching the ? NO selector. It has to
match the Pod
Service? right Pod label? labels
YES YES YES YES

Does the Pod There is an issue


~$ kubectl port-forward <ingress-pod-name> 8080:<ingress-port> have an IP
address ? NO with the Controller
manager
assigned?
The issue is YES
Can you visit the specific to the
app? ? NO Ingress controller.
Consult the docs
for your Ingress. There is an issue
YES with the Kubelet

Therunning
Ingress is ~$ kubectl port-forward service/<service-name> 8080:<service-port>

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
you visit it from ? NO infrastructure and
the public
internet?
YES
how the cluster is
exposed. Therunning
Service is
correctly
END
https://learnk8s.io/troubleshooting-deployments

You might also like