The kubectx for operators. Fuzzy search across 14+ cloud providers, per-terminal context isolation, history navigation, and extensible hooks — built for large-scale Kubernetes.
- 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 withswitch .orswitch - - 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— setalias kubectx=switchand keep your workflow
Step 1 — Install the binary (pick one):
# Homebrew (recommended)
brew tap MichaelSp/kswitch
brew trust --cask michaelsp/kswitch/kubectl-switch
brew install kubectl-switch# Direct download
curl -L -o /usr/local/bin/kubectl-switch \
https://github.com/MichaelSp/kswitch/releases/latest/download/kubectl-switch_darwin_amd64
chmod +x /usr/local/bin/kubectl-switchStep 2 — Wire up the shell function (pick one):
# zsh
echo 'source <(kubectl-switch init zsh)' >> ~/.zshrc && source ~/.zshrc# bash
echo 'source <(kubectl-switch init bash)' >> ~/.bashrc && source ~/.bashrcStep 1 — Install the binary:
curl -L -o /usr/local/bin/kubectl-switch \
https://github.com/MichaelSp/kswitch/releases/latest/download/kubectl-switch_linux_amd64
chmod +x /usr/local/bin/kubectl-switchStep 2 — Wire up the shell function (pick one):
# bash
echo 'source <(kubectl-switch init bash)' >> ~/.bashrc && source ~/.bashrc# zsh
echo 'source <(kubectl-switch init zsh)' >> ~/.zshrc && source ~/.zshrcStep 1 — Install the binary: Download kubectl-switch_windows_amd64.exe from the releases page, rename it to kubectl-switch.exe, and place it in your PATH.
Step 2 — Wire up the shell function:
kubectl-switch init powershell >> $PROFILE
. $PROFILEThen type switch (bash/zsh) or kubectl-switch (fish/PowerShell) to start.
Full documentation is available at MichaelSp.github.io/kswitch:
- Installation guide — shell completion, all platforms
- Kubeconfig stores — multi-provider setup
- Search index — caching for large setups
- Hooks — extensibility
- Cloud provider guides — EKS, AKS, GKE, Gardener, Vault, and more

