Kartik Nadar:
Hi All - how can i check current namespaces i’m on?
Davi Araújo:
kubectl config view | grep namespace
Jiri Frantisek:
but this works when you have only 1 context defined
I’m using kubectl config get-contexts
and looking for *
which marks current context
Shwetha Shenoy V:
kubectl config get-contexts $(kubectl config current-context)
The output should contain any namespace set by you on the current context.