ungleich-tools/k8s/nodes-with-suffix.sh

9 lines
279 B
Bash
Raw Normal View History

2021-12-14 15:02:19 +00:00
#!/bin/sh
# Execute commands on all hosts of the currently selected kubernetes cluster
# Do export KUBECONFIG=~/your-admin.conf before using this script
# Can be used to pass into cdist
domain=$1; shift
echo $(kubectl get node -o name | sed -e 's,node/,,' -e "s,\$,.$domain,")