kls/README.md

44 lines
1.2 KiB
Markdown
Raw Normal View History

2024-04-07 19:34:56 +00:00
# KLS
2024-04-24 03:56:29 +00:00
2024-04-07 19:34:56 +00:00
## Description
2024-04-26 04:40:54 +00:00
`kls` is a cli tool based on `kubectl` for managing kubernetes cluster resources.
2024-05-03 19:57:28 +00:00
Inspired by `lf` and `ranger` file managers, written in python.
2024-05-04 10:22:23 +00:00
It is lightweight (~250 lines of code) and easy to customize.
Supports mouse navigation as well as keyboard navigation.
2024-04-24 03:56:29 +00:00
2024-04-26 04:40:54 +00:00
## Key bindings
2024-05-04 10:22:23 +00:00
### For kubectl
2024-05-10 16:34:02 +00:00
You can customize these bindings or add extra bindings in `KEY_BINDINGS` variable of `kls` in a row #5:
2024-12-17 14:28:39 +00:00
- `Ctrl+y` - get yaml of resource
- `Ctrl+d` - describe resource
- `Ctrl+e` - edit resource
- `Ctrl+l` - logs of pod
- `Ctrl+x` - exec into pod
- `Ctrl+n` - network debug of pod (with nicolaka/netshoot container attached)
2024-04-23 18:16:34 +00:00
- `delete` - delete resource
2024-05-04 10:22:23 +00:00
### Other:
2024-12-17 14:28:39 +00:00
- `/` - enter filter mode
2024-04-26 04:40:54 +00:00
- `Escape` - exit filter mode or `kls` itself
2024-05-04 10:22:23 +00:00
- `Backspace` - remove letter from filter
- `TAB`, arrow keys, `PgUp`, `PgDn`, `Home`, `End` - navigation
2024-04-07 19:43:38 +00:00
![kls in action](./images/kls.gif)
2024-04-24 03:56:29 +00:00
2024-04-07 19:34:56 +00:00
## Dependencies
2024-04-07 20:08:00 +00:00
- `python3`
- `kubectl`
2024-07-28 08:25:53 +00:00
- `bat`
2024-04-24 03:56:29 +00:00
2024-04-07 19:34:56 +00:00
## Installation
2024-12-03 07:48:01 +00:00
Install `batcat`:
```
sudo apt install bat -y
```
2024-12-03 07:46:07 +00:00
Download and install the latest `kls`:
2024-04-07 19:34:56 +00:00
```
2024-12-03 07:46:07 +00:00
curl -O "https://git.digitalstudium.com/digitalstudium/kls/raw/branch/main/kls" && sudo install ./kls /usr/local/bin/ && rm -f ./kls
2024-04-07 19:34:56 +00:00
```