#!/bin/bash ## ## Script to automate the Kubernetes CentOS client side pieces ## . .gce_kubernetes.config echo "######################################" echo "Set the gcloud compute region and zone" echo "######################################" gcloud config set compute/region $GCE_REGION gcloud config set compute/zone $GCE_ZONE gcloud config set project $GCE_PROJECT echo "Compute region and zone set" echo "" KUBE_CONTROLLERS=$((KUBE_CONTROLLERS-1)) for ((i=0; i<=$KUBE_CONTROLLERS; i++)); do gcloud compute scp controller-files/rbac_authorizations.yaml controller-files/kube-apiserver_rbac.yaml controller-files/kubernetes.default.svc.cluster.local.conf nginx_health_monitor_setup.sh controller-${i}: done echo "Controller setup scripts copied across" for ((i=0; i<=$KUBE_CONTROLLERS; i++)); do gcloud compute ssh controller-${i} -- sudo ~/nginx_health_monitor_setup.sh done