Skip to content

erikkinding/sk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sk

Switch Kontext is a simple utility to quickly move between Kubernetes contexts and namespaces.

Installation

# Requires Go
go install github.com/erikkinding/sk@v0.3.2

Make sure your Go bin directory is part of your path, or create an alias for sk.

Usage

sk -h

Output:
-N    Only select namespace from the ones available for the selected context
-n    Select namespace from the ones available for the selected context
-p    Use to switch to the previously used context and namespace. Has no effect if state can't be retrieved from temp file.

Primarily, sk looks at $KUBECONFIG to decide which configuration to use and alter. If not set, it defaults to ~/.kube/config.

Handy alias:

alias skp="sk -p" # Previously selected context and namespace
alias skn="sk -n" # Also prompt for namespace selection
alias skN="sk -N" # Only prompt for namespace selection

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages