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

@@ -50,9 +50,9 @@ if [[ "$DEPLOYMENT" == "" ]]; then
exit 1
)
deployment=($(kubectl get deployments --all-namespaces -owide | fzf | awk '{print $1, $2}'))
DEPLOYMENT=$deployment[1]
NAMESPACE=$pod[0]
deployment=($(kubectl get deployments --all-namespaces -o wide | _fzf | awk '{print $1, $2}'))
DEPLOYMENT=${deployment[1]}
NAMESPACE=${pod[0]}
fi
kubectl patch deployment -n ${NAMESPACE} ${DEPLOYMENT} -p '{"spec": { "template": { "spec": { "tolerations": [ { "operator": "Exists" } ] } } } }' 1>/dev/null