Konubinix' opinionated web of thoughts

How to Set a Default Namespace for "Kubectl"

Fleeting

How to set a default namespace for “kubectl” - 21zoo Labs - Assorted Stuff

$ kubectl config set-context kube-cluster-ctx –namespace=my-namespace Context “kube-cluster-ctx” created. You have to also start using the context once it’s created like so:

$ kubectl config use-context kube-cluster-ctx Switched to context “kube-cluster-ctx”.

https://stuff.21zoo.com/posts/kubectl-set-default-namespace/