kls/README.md

44 lines
1.1 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-04-26 04:40:54 +00:00
- `1` or `Enter` - get yaml of resource
2024-04-14 15:14:04 +00:00
- `2` - describe resource
- `3` - edit resource
- `4` - logs of pod
2024-04-23 18:16:34 +00:00
- `5` - exec to pod
2024-04-24 17:40:49 +00:00
- `6` - 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:
- letters - enter filter mode and apply filter
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
Download latest `kls`:
```
curl -O "https://git.digitalstudium.com/digitalstudium/kls/raw/branch/main/kls"
```
Then install it:
```
sudo install ./kls /usr/local/bin/
```