Interactively switch between Kubernetes config files using a fuzzy finder.
Scans ~/.kube/ for files matching config-*, presents them in an fzf picker, and updates ~/.kube/config (a symlink) to point to the selected file. The currently active config is shown at the top of the list.
- Python 3
fzfinstalled and on yourPATH- Python dependency:
iterfzf
pip install -r requirements.txt
Name your kubeconfig files with a config- prefix inside ~/.kube/:
~/.kube/
├── config ← symlink managed by kube-selector
├── config-prod
├── config-staging
└── config-dev
python kube-selector.py
Use arrow keys or type to filter, then press Enter to switch. Press Escape or Ctrl-C to cancel without making any changes.