Skip to content

Shell commands using kubectl and fzf for command-line fuzzy searching of Kubernetes Pods.

License

Notifications You must be signed in to change notification settings

en0/kube-fzf

 
 

Repository files navigation

kube-fzf

Shell commands using kubectl and fzf for command-line fuzzy searching of Kubernetes Pods. It helps to interactively:

  • search for a Pod
  • tail a container of a Pod
  • exec in to a container of a Pod
  • describe a pod
  • port forward pod

Prerequisite

  • fzf
  • xclip Only for Linux and it is optional

Install

Using Homebrew

brew tap thecasualcoder/stable
brew install kube-fzf

Manual

git clone https://github.com/thecasualcoder/kube-fzf.git ~/.kube-fzf
./install.sh

Usage

findpod

findpod [-a | -n <namespace-query>] [pod-query]

findeploy

findeploy [-a | -n <namespace-query>] [deploy-query]

scaledeploy

scaledeploy [-a | -n <namespace-query>] scale-number

editdeploy

editdeploy [-a | -n <namespace-query>] [deploy-query]

deletepod

deletepod [-a | -n <namespace-query>] [pod-query]

describepod

describepod [-a | -n <namespace-query>] [pod-query]

tailpod

tailpod [-a | -n <namespace-query>] [pod-query]

taildeploy

taildeploy [-a | -n <namespace-query>] [deployment-query]

execpod

execpod [-a | -n <namespace-query>] [pod-query] <command>

pfpod

pfpod [-c | -o | -a | -n <namespace-query>] [pod-query] <port>

Options

-a                    -  Search in all namespaces
-n <namespace-query>  -  Find namespaces matching <namespace-query> and do fzf.
                         If there is only one match then it is selected automatically.
-h                    -  Show help

Demo

findpod

Demo for findpod

describepod

Demo for describepod

tailpod

Demo for tailpod

tailpod - multiple containers

Demo for tailpod with multiple containers

execpod

Demo for execpod

execpod - multiple containers

Demo for execpod with multiple containers

fzf Namespace (only when no match found for the given namespace)

Demo for wrong namespace

Similar Projects

For switching Kubernetes contexts and namespaces interactively from the command-line use kubectx

About

Shell commands using kubectl and fzf for command-line fuzzy searching of Kubernetes Pods.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%