Richard Rublev
Richard Rublev

Reputation: 8170

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

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?

Upvotes: 1

Views: 7817

Answers (1)

quoc9x
quoc9x

Reputation: 2191

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

Upvotes: 4

Related Questions