Updated fzf usage and updated kube-ssh to use kubectl debug

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
2023-01-04 23:38:25 +00:00
parent 2a59d2b677
commit c57251d4d5
5 changed files with 32 additions and 20 deletions

View File

@@ -56,9 +56,9 @@ if [[ "$POD" == "" ]]; then
exit 1
)
pod=($(kubectl get pods --all-namespaces -owide | fzf | awk '{print $1, $2}'))
POD=$pod[1]
NAMESPACE=$pod[0]
pod=($(kubectl get pods --all-namespaces -o wide | _fzf | awk '{print $1, $2}'))
POD=${pod[1]}
NAMESPACE=${pod[0]}
fi
echo kubectl exec -it --namespace $NAMESPACE $POD $CMD