diff --git a/k8s/nodes-with-suffix.sh b/k8s/nodes-with-suffix.sh new file mode 100755 index 0000000..60b6fb9 --- /dev/null +++ b/k8s/nodes-with-suffix.sh @@ -0,0 +1,8 @@ +#!/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,")