Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitagry/kj
Edit and create Kubernetes job from cronjob template using your EDITOR
https://github.com/kitagry/kj
cronjob job k8s kubernetes
Last synced: 6 days ago
JSON representation
Edit and create Kubernetes job from cronjob template using your EDITOR
- Host: GitHub
- URL: https://github.com/kitagry/kj
- Owner: kitagry
- Created: 2021-06-12T06:59:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-16T23:56:40.000Z (4 months ago)
- Last Synced: 2024-11-02T04:12:09.629Z (13 days ago)
- Topics: cronjob, job, k8s, kubernetes
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## kj
Create and Edit Kubernetes job from cronjob template using your `$EDITOR`.
![kj](https://user-images.githubusercontent.com/21323222/121770891-0e033400-cba7-11eb-9d99-4cdc473f5774.gif)
### Usage
```
kj namespace name
kj namespace/name
kj name
```This command opens the editor with the job yaml from specified cronjob.
`kj` command apply your changes.### Install
#### build from source
Requirement: Go 1.16+
```
go install github.com/kitagry/kj@latest
```#### MacOS
```
brew install kitagry/tap/kj
```### Expansion
This command is simple CLI, and expansiable.
For example, you can write following code in your `.zshrc`, and then use `kjf` command.
Watch the video for the acutual behavior.
You can use your favorite fuzzy finder(fzf, peco, etc).```zsh
kjf() {
kubectl get cronjobs --all-namespaces | tr -s ' ' | cut -d ' ' -f 1,2 | tail -n +2 | fzf | xargs kj
}
```### Inspired
- [mmv](https://github.com/itchyny/mmv)