#!/bin/bash ## ## Script to automate the Kubernetes CentOS client side pieces ## echo "#####################################" echo "Grabbing the CloudFlare SSL tools ..." echo "#####################################" wget https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 \ https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 mkdir ~/bin mv cfssl_linux-amd64 ~/bin/cfssl mv cfssljson_linux-amd64 ~/bin/cfssljson chmod 755 ~/bin/cfssl* echo "CloudFlare tools have been installed into ~/bin" echo "" echo "######################################" echo "Set the gcloud compute region and zone" echo "######################################" . .gce_kubernetes.config 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 "" mkdir certs-dir cd certs-dir echo "#############################" echo "Creating the CA configuration" echo "#############################" cat > ca-config.json < ca-csr.json < admin-csr.json < ${i}-csr.json < kube-controller-manager-csr.json < kube-proxy-csr.json < kube-scheduler-csr.json < kubernetes-csr.json < service-account-csr.json < encryption-config.yaml <