Kubectl Set-context _best_

export KUBECONFIG=~/.kube/config:~/secrets/gke-config kubectl set-context gke-prod --cluster=gke-prod --user=gke-user

kubectl set-context <context-name> [flags] kubectl set-context

Now, any kubectl get pods will automatically show pods in the backend namespace. This is non-destructive; you can always override it with -n frontend when needed. export KUBECONFIG=~/

kubectl set-context development --cluster=staging-cluster kubectl set-context

Top