From e6a21b58f2b3b69791607f96161cd4b5f7891bfe Mon Sep 17 00:00:00 2001 From: Akanksha Kumari Date: Fri, 30 Sep 2022 00:15:55 +0530 Subject: [PATCH] Update information on how to change default namespace --- content/en/docs/reference/kubectl/_index.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/en/docs/reference/kubectl/_index.md b/content/en/docs/reference/kubectl/_index.md index 0f79b0f556..dcd39c4a5a 100644 --- a/content/en/docs/reference/kubectl/_index.md +++ b/content/en/docs/reference/kubectl/_index.md @@ -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= +``` ## Operations