13 lines
325 B
Bash
Executable file
13 lines
325 B
Bash
Executable file
#!/bin/sh
|
|
# Execute commands on all hosts of the currently selected kubernetes cluster
|
|
# Do export KUBECONFIG=~/your-admin.conf before using this script
|
|
|
|
#set -x
|
|
|
|
domain=$1; shift
|
|
|
|
tmp=$(mktemp)
|
|
kubectl get node -o name | sed -e 's,node/,,' -e "s,\$,.$domain,"> "$tmp"
|
|
#cat "$tmp"
|
|
pssh -h "$tmp" -l root -i "$@"
|
|
rm -f "$tmp"
|