Skip to content

Instantly share code, notes, and snippets.

@niiku-y
Last active December 8, 2018 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niiku-y/7d5c7c650e59d6c816e3372f6dcd17a2 to your computer and use it in GitHub Desktop.
Save niiku-y/7d5c7c650e59d6c816e3372f6dcd17a2 to your computer and use it in GitHub Desktop.
#!/bin/bash
# copy_kubeconf_rancher.sh
HOSTLIST="master01 master02 master03"
for h in $HOSTLIST
do
scp kube_config_rancher-cluster.yml ubuntu@${h}:/home/ubuntu/
ssh ubuntu@${h} echo "export KUBECONFIG=/home/ubuntu/kube_config_rancher-cluster.yml" \>\> .profile
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment