add k8s helper

This commit is contained in:
Nico Schottelius 2021-12-14 16:02:19 +01:00
parent 5b3892bde4
commit 2cab333fd6
1 changed files with 8 additions and 0 deletions

8
k8s/nodes-with-suffix.sh Executable file
View File

@ -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,")