Skip to content

A kubectl plugin supercharged by fzf to create an interactive menu to interact with Kubernetes objects from your terminal.

License

Notifications You must be signed in to change notification settings

schabrolles/kubectl-commander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kubectl-commander

Unlock Insights into Your Kubernetes Cluster Are you tired of digging through logs and events to troubleshoot issues in your Kubernetes cluster? This powerful plugin gives you the tools you need to gain instant insights and control over your objects.

Supercharged by fzf, it creates an intuitive menu that lets you navigate and dig your kubernetes cluster, select from a range of options for each object - whether it's viewing logs, checking events, or executing custom commands - and watch as the results are displayed into terminal window.

Gain instant visibility into your cluster's performance and behavior with minimal effort. No more tedious searching through logs and events; with this plugin, you'll have everything at your fingertips.

Conveniant like a gui, quick and responsive like a cli ;)

Screenshots

Navigate through pods while displaying YAML. Quckly display pods Logs (in follow mode).
pods_yaml pods_log

Quickstart

Prerequisites

krew

Note: You will need git to install the krew plugin. the commander plugin is installed using the krew plugin manager for Kubernetes CLI. Installation instructions for krew can be found here.

Other needed software

To enjoy kube commander, please install the 2 following product:

Uncompress and copy the fzf and yq binaries into your PATH DIR

Installation

After installing & configuring the k8s krew plugin, install outdated using the following command:

kubectl krew install commander

Usage

  • basic
kubectl commander pods

this will open kubectl commander to list all the pods in the current namespace.

  • All namespaces
kubectl commander pods -A
  • multiple objects
kubectl commander secret,configmap -A
  • Don't remember the object name ?
kubectl commander -a

=> This will open an fzf list of all the objects installed on your cluster. Enter a fzf query, select the objects you want (with TAB) then press Enter.

Key Bindings:

key Binding Actions
ctrl-h print this help menu
ctrl-q Quit
ctrl-r Reload
TAB select items
ctrl-a select all items
ctrl-alt-a deselect all items
ctrl-y preview YAML.
* press this key several time to cycle between preview mode (right,top,hidden)
* press 'Enter' to add/change the yq query (default is '.') .
ctrl-v preview and follow Events (for objects which have events)
* press this key several time to cycle between preview mode (top 50%,top 80%,hidden)
* press 'Enter' to follow the events in full screen
ctrl-l preview and follow Logs (for pods)
* press this key several time to cycle between preview mode (top 50%,top 80%,hidden)
* press 'Enter' to follow the events in full screen
ctrl-x Enter into container (for pods, deployments)
ctrl-d /!\ delete object /!\ (works with multi selection)
ctrl-e edit object
ctrl-s edit secret (decrypt/encrypt)
-> (need 'modify-secret' krew plugin)
ctrl-w toggle watch mode (automatic refresh 2s)
alt-l toggle wrap line in preview (default off)

kube-commander in action: asciicast

  • filter pods
  • [ctrl-y]: view yaml
  • [ctrl-l]: view logs
  • [ctrl-d]: delete pods
  • [ctrl-w]: wtach mode

About

A kubectl plugin supercharged by fzf to create an interactive menu to interact with Kubernetes objects from your terminal.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages