#!/bin/bash ## ## Script to uninstall etcd from controllers ## . .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 ssh controller-${i} -- 'sudo yum remove -y etcd; sudo rm -rf /var/lib/etcd /etc/etcd' done