Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 759 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 759 Bytes

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: