|
|
||
|---|---|---|
| diagrams | ||
| images | ||
| tests | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| kls | ||
README.md
KLS
Description
kls is a cli tool based on kubectl for managing kubernetes cluster resources.
Inspired by lf and ranger file managers, written in python.
It is lightweight (~400 lines of code) and easy to customize. Supports keyboard navigation and mouse navigation could be enabled (set MOUSE_ENABLED=True in a line #69).
Key bindings
For kubectl
You can customize these bindings or add extra bindings in KEY_BINDINGS variable of kls in a line #14:
Ctrl+y- get Yaml of resourceCtrl+d- Describe resourceCtrl+e- Edit resourceCtrl+l- Logs of podCtrl+x- eXec into podCtrl+n- Network debug of pod (with nicolaka/netshoot container attached)Ctrl+a- Access logs of istio sidecarCtrl+p- exec into istio-Proxy sidecarCtrl+r- Reveal base64 secret valuesdelete- delete resource
Other:
/- enter filter modeEscape- exit filter mode orklsitselfBackspace- remove letter from filterTAB, arrow keys,PgUp,PgDn,Home,End- navigation
Dependencies
python3kubectlbat- yaml viewerlnav- log vieweryq- yaml manipulation
Installation
Install batcat and other dependencies:
sudo apt install bat lnav yq -y
Download and install the latest kls:
curl -O "https://git.digitalstudium.com/digitalstudium/kls/raw/branch/main/kls" && sudo install ./kls /usr/local/bin/ && rm -f ./kls
