[Refer To] https://kubernetes.io/zh-cn/docs/reference/kubectl/cheatsheet/
You can switch current namespace with:
Bash
kubectl config set-context --current --namespace=<namespace-name>
Check if it works:
Bash
kubectl config view | grep namespace
Also, you can unset current namespace with:
Bash
kubectl config set-context --current --namespace=""
Leave a Reply Cancel reply