Small CLI to quickly switch Azure Subscriptions and Kubenetes contexts all at once with fuzzy search
0

Configure Feed

Select the types of activity you want to include in your feed.

Shell 100.0%
3 1 0

Clone this repository

https://tangled.org/chrismin13.com/akswitch https://tangled.org/did:plc:7tik2jcf6st2hechohhvvkog
git@tangled.org:chrismin13.com/akswitch git@tangled.org:did:plc:7tik2jcf6st2hechohhvvkog

For self-hosted knots, clone URLs may differ based on your setup.



README.md

az-kube-switch#

Stop doing az logout, az login and kubectl config use-context all the time. Pick your Azure Subscription and kubectl context all at once, with fuzzy search.

demo.gif

Install#

Run the following command to automatically verify requirements, install fzf (via apt if missing and available), install akswitch to /opt/akswitch, and configure your shell PATH:

bash <(curl -fsSL https://tangled.org/chrismin13.com/akswitch/raw/main/install.sh)

After the script finishes, reload your shell configuration:

source ~/.bashrc
# Or if you are using zsh:
source ~/.zshrc

Manual Install#

If you prefer to install it manually:

  1. Ensure all requirements are met:
    # On Ubuntu/Debian (for fzf):
    sudo apt update
    sudo apt install -y fzf
    # Ensure az and kubectl are also installed.
    
  2. Clone this repository or download the akswitch script.
  3. Add a wrapper function to your shell configuration (e.g. ~/.bashrc):
    akswitch() {
        /path/to/cloned/akswitch "$@"
    }
    
  4. Reload your configuration:
    source ~/.bashrc
    

Usage#

akswitch