Unset namespace from Current-context

Viewed 1454

I have set the namespace to current context like below

kubectl config set-context --current --namespace=ns1

I tried to unset the namespace from current context , but it didn't work.

I am looking for help, Could you please share me the command to unset the namespace to default .

1 Answers
kubectl config set-context --current --namespace=default

or

kubectl config unset contexts.name-or-your-current-context.namespace

Both will result in usage of the default namespace for the current context.

Related