k9s UI shows stale context and cluster names while displaying resources from new context
Describe the bug
Context and cluster names don't refresh when switching between Kubernetes contexts via kubectl config use-context or kubectx
To Reproduce Steps to reproduce the behavior:
- Open k9s
- Select the appropriate context
- Switch context using either
kubectl config use-contextorkubectx - k9s still displays the old context and cluster information in the top corner
- However, all resources shown are actually from the newly selected cluster
Expected behavior The context and cluster names need to update after a context switch. Or, k9s should show resources based on the context selected in k9s, not whatever's currently set via kubectl.
Versions (please complete the following information):
- OS: Linux
- K9s: v0.50.16
- K8s: v1.33.5-gke.1201000
@2b Hum can't seem to repro this as k9s seems to show the correct content (#5 above). I've tried on a couple different clusters via kubectx and can't repro. Are you certain about step-5?
K9s should only load the context as selected and decouples from context set via the shell.