KubeZero/scripts/exec_each_node.sh

9 lines
166 B
Bash
Raw Permalink Normal View History

#!/bin/bash
NODES=$(kubectl get nodes -o json | jq -rc .items[].status.addresses[0].address)
for n in $NODES; do
>&2 echo "Node: $n"
ssh -q alpine@$n "$@"
done