Skip to content

ggtrd/kontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kontext

Quickly manage Kubernetes contexts.

demo gif

kubectl must be installed.

Kontext is POSIX compliant.

Usage

  • switch current the context from selectable menu

    kontext
    
    kontext -f <kubeconfig_file>
    
  • delete a context and its associated cluster/user

    kontext -d <context_name>
    
  • display help

    kontext --help
    

Installation

Install on current user

  • Bash
    KONTEXT_CLI="/home/$USER/.kube/kontext.sh" \
        && curl https://raw.githubusercontent.com/ggtrd/kontext/refs/heads/main/kontext.sh -o $KONTEXT_CLI \
        && chmod +x $KONTEXT_CLI \
        && echo "alias kontext='$KONTEXT_CLI'" >> /home/$USER/.bashrc \
        && source /home/$USER/.bashrc
    
  • Fish
    set -g KONTEXT_CLI "/home/$USER/.kube/kontext.sh" \
        && curl https://raw.githubusercontent.com/ggtrd/kontext/refs/heads/main/kontext.sh -o $KONTEXT_CLI \
        && chmod +x $KONTEXT_CLI \
        && echo "alias kontext '$KONTEXT_CLI'" >> /home/$USER/.config/fish/config.fish \
        && source /home/$USER/.config/fish/config.fish
    

Use as a simple script

./kontext.sh

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Quickly manage Kubernetes contexts

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages