Skip to content

kubernetes context and namespace switch using shell/bash script

License

Notifications You must be signed in to change notification settings

gaganyaan2/kubernetes-kn-kx-bash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kubernetes-kn-kx-bash

Simple kubernetes context and namespace switch using shell/bash script

Install kn and kx:

curl -s https://raw.githubusercontent.com/koolwithk/kubernetes-kn-kx-bash/main/install.sh | sudo bash

Run:

kn                 #show current namespace
kx                 #show current context

kn <namespace>     #switch to other namespace
kx <context>       #switch to other context

Why kx and kn in bash?

  • Size is less than 10KB
  • Simple and Easy to install

Limitation:

  • Slower than kubectx/kubens as it's calls shell sed, awk, grep, kubectl in background.

Prerequisites:

  • kubectl

Refrences:

About

kubernetes context and namespace switch using shell/bash script

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages