Skip to content

kswitch

Open Source · Apache 2.0 · CLI Tool

Switch Kubernetes contexts
at the speed of thought

kswitch is the kubectx for operators — fuzzy search across 14+ cloud providers, terminal isolation, history navigation, and hooks. Built for large-scale Kubernetes.

kswitch context switching demo$ switch — fuzzy context search
kswitch namespace switch demo$ switch ns — namespace switch
Features

Everything operators need

Instant fuzzy search
Search all contexts across every provider and kubeconfig in one keystroke. Hot-reload adds new files on the fly.
🖥
Terminal isolation
Each terminal window targets a different cluster independently — kswitch never touches the original kubeconfig.
📜
History navigation
Every context+namespace tuple is recorded. Jump back with switch . or step through with switch -.
🏷
Context aliases
Give human-friendly names to cryptic generated context names without modifying the underlying kubeconfig.
🗄
Search index cache
Local index for instant results across massive directories or slow remote stores like Vault.
🔌
Extensible hooks
Run arbitrary executables before search — sync from Git, refresh tokens, rotate credentials.
Supported providers

14+ cloud providers, one search

Amazon EKSAzure AKSGoogle GKEGardenerHashicorp VaultFilesystemDigitalOceanRancherExoscaleOVHAkamai / LinodeCluster APIScaleway

Missing your provider? Contributions welcome →

Install

Get running in 30 seconds

Choose your platform — then see the full installation guide for shell completion and advanced options.

zsh
$ brew tap MichaelSp/kswitch
$ brew install —cask kswitch
$ echo ‘source <(kswitch init zsh)’ >> ~/.zshrc
$ source ~/.zshrc
✓ Ready — type switch to start
bash
$ chmod +x /usr/local/bin/kswitch
$ echo ‘source <(kswitch init bash)’ >> ~/.bashrc && source ~/.bashrc
✓ Ready — type switch to start
PowerShell
# Download the binary from GitHub Releases and place it in your PATH
PS> kswitch init powershell >> $PROFILE
PS> . $PROFILE
✓ Ready — type kswitch to start