Closed Benjie-legit closed 1 year ago
kube-ps1 does use the context name, not the cluster name:
KUBE_PS1_CONTEXT="$(${KUBE_PS1_BINARY} config current-context 2>/dev/null)"
You can set aliases in your kubeconfig file to organize the names, example:
kubectl config rename-context $(kubectl config current-context) test-alias
Closing this issue. Solution above should provide necessary data on the prompt.
Im using the same cluster name (e.g example-cluster) across my different env's (staging, prod) but the context names are different.
How ca I configure kube-ps1 to display the context name and not the cluster name?
currently it displays the same name for all env's, and its not helping at all