kubectl get pods --context=staging-gcp
kubectl config view --minify -o jsonpath='..namespace' kubectl change current context
This overrides the current context for one command only. kubectl change current context
NAME column of the previous step: bash kubectl config use-context my-cluster-name Use code with caution. Copied to clipboard Verify the Change Confirm that the active context has updated: bash kubectl config current-context Use code with caution. Copied to clipboard Efficiency Tips Switching Namespaces Only: If you want to stay in the same cluster but change the default namespace for that context: bash kubectl config set kubectl change current context