Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unset namespace from Current-context

Tags:

kubernetes

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 .

like image 437
args Avatar asked Mar 23 '26 18:03

args


1 Answers

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

or

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

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

like image 104
Fritz Duchardt Avatar answered Mar 26 '26 15:03

Fritz Duchardt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!