For example, create a context for production that automatically sets a strict namespace, but combine it with a shell prompt change.
kubectl config set-context [NAME] --cluster=[CLUSTER] --user=[USER] --namespace=[NAMESPACE] Imagine you have a production cluster named prod-us-east and a user named prod-admin . You want a quick way to switch to the payment namespace. kubectl config set context
The syntax is deceptively simple: