Skip to content
/ kj Public

Edit and create Kubernetes job from cronjob template using your EDITOR

Notifications You must be signed in to change notification settings

kitagry/kj

Repository files navigation

kj

Create and Edit Kubernetes job from cronjob template using your $EDITOR.

kj

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).

kjf() {
  kubectl get cronjobs --all-namespaces | tr -s ' ' | cut -d ' ' -f 1,2 | tail -n +2 | fzf | xargs kj
}

Inspired

About

Edit and create Kubernetes job from cronjob template using your EDITOR

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages