Feature request: browse context history
Author: ryanmcnamaraCreated Jul 8, 2025Updated Aug 23, 2025
Labels😇Feature Request
kubectx -which is documented here
I: kubectx -h
USAGE:
kubectx : list the contexts
kubectx <NAME> : switch to context <NAME>
kubectx - : switch to the previous context
kubectx -c, --current : show the current context name
...Is great for switching to the previous context. What I would like is to be able to see the previous n contexts and choose between them. Perhaps a new flag could be created something like kubectx --history?
For my own personal use I plan to set it up to have kubectx or an alias default to this most recent ordering (contexts not in the history at all would come last)
Open to other suggestions / workarounds as well!
Source: ahmetb/kubectx