Skip to content

Instantly share code, notes, and snippets.

@danehans
Last active November 17, 2018 22:03
Show Gist options
  • Save danehans/681e95645c517c8753a403b0431ae570 to your computer and use it in GitHub Desktop.
Save danehans/681e95645c517c8753a403b0431ae570 to your computer and use it in GitHub Desktop.
fedv2-gke-osx-deploy

Fedv2 GKE Deploy Steps on Mac OSX

Set envs

export ZONE1=us-west1-a
export ZONE2=us-west1-b

Create 2 clusters

gcloud container clusters create cluster1 --zone $ZONE1 --cluster-version 1.11.2-gke.18 --num-nodes 4 --scopes https://www.googleapis.com/auth/ndev.clouddns.readwrite --machine-type n1-highmem-2
gcloud container clusters create cluster2 --zone $ZONE2 --cluster-version 1.11.2-gke.18 --num-nodes 4 --scopes https://www.googleapis.com/auth/ndev.clouddns.readwrite --machine-type n1-highmem-2

Rename contexts to match fed-v2 user guide

kubectl config rename-context gke_level-scheme-173421_us-west1-a_cluster1 cluster1
kubectl config rename-context gke_level-scheme-173421_us-west1-b_cluster2 cluster2

Set current context to cluster1

kubectl config use-context cluster1

Fix rbac issue

kubectl create clusterrolebinding danehans-cluster-admin-binding --clusterrole=cluster-admin \
  --user=$(gcloud config get-value core/account) --context cluster1
kubectl create clusterrolebinding danehans-cluster-admin-binding --clusterrole=cluster-admin \
  --user=$(gcloud config get-value core/account) --context cluster2

Deploy fed-v2 (latest):

./scripts/deploy-federation-latest.sh cluster2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment