Update information on how to change default namespace

pull/37069/head
Akanksha Kumari 2022-09-30 00:15:55 +05:30
parent 2fbf62ea2e
commit e6a21b58f2
1 changed files with 7 additions and 1 deletions

View File

@ -101,7 +101,13 @@ then kubectl assumes it is running in your cluster. The kubectl tool looks up th
namespace of that ServiceAccount (this is the same as the namespace of the Pod)
and acts against that namespace. This is different from what happens outside of a
cluster; when kubectl runs outside a cluster and you don't specify a namespace,
the kubectl command acts against the current-context's namespace.
the kubectl command acts against the namespace set for the current context in your
client configuration. To change the default namespace for your kubectl you can use the
following command:
```shell
kubectl config set-context --current --namespace=<namespace-name>
```
## Operations