Namespaces not found Namespaces not found kubernetes kubernetes

Namespaces not found


I had previously created two contexts and my minikube cluster was set to still be in the n2 context. I deleted the context, re-ran the command and it worked.


Add namespace: n3 to deployment spec


In my case I created context and set --namespace to not existing one, the solution was switch namespace only using the kubectl commands:

kubectl config set-context --current --namespace=<namespace>

You can check if in your situation is the same problem using:

kubectl get svc -o widekubectl describe sa default | grep Namespace