the question says:
We have deployed a pod pod22-ckad-svcn in the default namespace.
the pod should be in the default namespace, but when you get all pods from all namespaces, the pod is in the namespace pod22-ckad-svcn
the question says:
We have deployed a pod pod22-ckad-svcn in the default namespace.
the pod should be in the default namespace, but when you get all pods from all namespaces, the pod is in the namespace pod22-ckad-svcn
No need to add the -A for the resources in the default namespace. If you just lookup with kubectl get pods, that shows the pods from default namespace.
hi @Santosh_KodeKloud the pod is not in the default namespace as the screenshot shows.
it is in dev-001
I just tried the lab. No, the pod is in the default namespace:
root@student-node ~ ➜ kubectl config use-context cluster3
Switched to context "cluster3".
root@student-node ~ ➜ k get po
NAME READY STATUS RESTARTS AGE
pod22-ckad-svcn 1/1 Running 0 20s
And also bear in mind that if any of the previous questions were on that cluster and you did
kubectl config set-context --current --namespace some-other-namespace
then when you come back to it later, it will still be on that namespace unless you kubectl config it back to default again.