📝 Edit page
➕ Add page
Context
Get context
$ kubectl config current-context
my-context
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
...
Set context
$ kubectl config set-context my-context
Namespace
You need to run commands in a namespace.
e.g.
$ kubectl get pods --namespace=my-namespace
Or set it globally for the context.
$ kubectl config set-context --current --namespace=my-namespace