schabrolles / kubectl-commander

A kubectl plugin supercharged by fzf to create an interactive menu to interact with Kubernetes objects from your terminal.
Apache License 2.0
5 stars 1 forks source link

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

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