k8s: add script to do something on all nodes of the cluster

This commit is contained in:
Nico Schottelius 2021-11-20 11:55:14 +01:00
parent 920833fa9b
commit 9fec5ad1ed

9
k8s/pssh-all-nodes.sh Executable file
View file

@ -0,0 +1,9 @@
#!/bin/sh
#set -x
tmp=$(mktemp)
kubectl get node -o name | sed 's,node/,,' > "$tmp"
#cat "$tmp"
pssh -h "$tmp" -l root -i "$@"
rm -f "$tmp"