I am trying to debug a pod with the status "ImagePullBackOff". The pod is in the namespace minio-operator, but when I try to to describe the pod, it is apparently not found.
Why does that happen?
[psr-admin@zon-psr-2-u001 ~]$ kubectl get all -n minio-operator NAME READY STATUS RESTARTS AGE pod/minio-operator-5dd99dd858-n6fdj 0/1 ImagepullBackoff 0 7d NAME READY. UP-TO-DATE AVAILABLE AGE deployment.apps/minio-operator 0 1 0 7d NAME DESIRED CURRENT READY AGE replicaset.apps/minio-operator-5dd99dd858 1 1 0 7d [psr-admin@zon-psr-2-u001 ~]$ kubectl describe pod minio-operator-5dd99dd858-n6fdj Error from server (NotFound): pods "minio-operator-5dd99dd858-n6fdj" not found
Error from server (NotFound): pods "minio-operator-5dd99dd858-n6fdj" not found
My pod stays pending If a Pod is stuck in Pending it means that it can not be scheduled onto a node. Generally this is because there are insufficient resources of one type or another that prevent scheduling. Look at the output of the kubectl describe ... command above.
Using kubectl describe pods to check kube-system If the output from a specific pod is desired, run the command kubectl describe pod pod_name --namespace kube-system . The Status field should be "Running" - any other status will indicate issues with the environment.
Running kubectl logs -p will fetch logs from existing resources at API level. This means that terminated pods' logs will be unavailable using this command. As mentioned in other answers, the best way is to have your logs centralized via logging agents or directly pushing these logs into an external service.
You've not specified the namespace in your describe pod command.
You did kubectl get all -n minio-operator
, which gets all resources in the minio-operator
namespace, but your kubectl describe
has no namespace, so it's looking in the default
namespace for a pod that isn't there.
kubectl describe pod -n minio-operator <pod name>
Should work OK.
Most operations in kubernetes are namespaced, so will require the -n <namespace>
argument unless you switch namespaces.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With