Skip to content

MichaelSp/kswitch

 
 

Repository files navigation

kswitch banner

kswitch

Latest GitHub release Build Go Report Card License

The kubectx for operators. Fuzzy search across 14+ cloud providers, per-terminal context isolation, history navigation, and extensible hooks — built for large-scale Kubernetes.

Highlights

  • Unified fuzzy search — one search over EKS, AKS, GKE, Gardener, Vault, filesystem, and more
  • Terminal isolation — each window targets a different cluster; the original kubeconfig is never modified
  • History — every {context, namespace} tuple recorded; jump back with switch . or switch -
  • Context aliases — human-friendly names for cryptic generated context names
  • Search index cache — instant results across massive directories or slow remote stores
  • Hooks — run arbitrary executables before search to sync, refresh, or rotate credentials
  • Drop-in replacement for kubectx — set alias kubectx=switch and keep your workflow

Demo

kswitch context switch demo kswitch namespace switch demo

Install

macOS

brew tap MichaelSp/kswitch
brew install --cask kswitch
echo 'source <(kswitch init zsh)' >> ~/.zshrc
source ~/.zshrc

Linux

curl -L -o /usr/local/bin/kswitch \
  https://github.com/MichaelSp/kswitch/releases/latest/download/kswitch_linux_amd64
chmod +x /usr/local/bin/kswitch
echo 'source <(kswitch init bash)' >> ~/.bashrc && source ~/.bashrc

Windows

Download the binary from the releases page, place it in your PATH, then:

kswitch init powershell >> $PROFILE
. $PROFILE

Then type switch (bash/zsh) or kswitch (fish/PowerShell) to start.

Documentation

Full documentation is available at MichaelSp.github.io/kswitch:

About

The kubectx for operators.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Go 92.6%
  • CSS 3.1%
  • MDX 1.3%
  • Makefile 1.0%
  • Shell 0.8%
  • JavaScript 0.5%
  • Other 0.7%