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
brew tap thecasualcoder/stable
brew install kube-fzf
git clone https://github.com/thecasualcoder/kube-fzf.git ~/.kube-fzf
./install.sh
findpod [-a | -n <namespace-query>] [pod-query]
findeploy [-a | -n <namespace-query>] [deploy-query]
scaledeploy [-a | -n <namespace-query>] scale-number
editdeploy [-a | -n <namespace-query>] [deploy-query]
deletepod [-a | -n <namespace-query>] [pod-query]
describepod [-a | -n <namespace-query>] [pod-query]
tailpod [-a | -n <namespace-query>] [pod-query]
taildeploy [-a | -n <namespace-query>] [deployment-query]
execpod [-a | -n <namespace-query>] [pod-query] <command>
pfpod [-c | -o | -a | -n <namespace-query>] [pod-query] <port>
-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
For switching Kubernetes contexts and namespaces interactively from the command-line use kubectx