Why is pod not found? Error from server (NotFound): pods "curl-pod" not found

Advertisements

I can list pods in my prod namespace

kubectl get pods -n prod
NAME       READY   STATUS    RESTARTS      AGE
curl-pod   1/1     Running   1 (32m ago)   38m
web        1/1     Running   1 (33m ago)   38m

I got error

kubectl describe pods curl-pod
Error from server (NotFound): pods "curl-pod" not found

Get events show

   Normal   Scheduled        pod/curl-pod   Successfully assigned prod/curl-pod to minikube

Why?

>Solution :

kubernetes manages by namespace, so you must specify namespace otherwise kubernetes will use namespace default.
So, you must type:

kubectl describe pod/curl-pod -n prod

Leave a ReplyCancel reply