Skip to content

Instantly share code, notes, and snippets.

@fai555
Created August 24, 2020 23:54
Show Gist options
  • Select an option

  • Save fai555/e59fb13dfc7a02805f4c899d47781990 to your computer and use it in GitHub Desktop.

Select an option

Save fai555/e59fb13dfc7a02805f4c899d47781990 to your computer and use it in GitHub Desktop.
export PROJECT_NAME=<PROJECT_NAME>
export CLUSTER_NAME=istio-ssl-demo
export COMPUTE_REGION=us-central1
export COMPUTE_ZONE=us-central1-c
export NUM_NODES=3
export MAX_NODES=6
export MIN_NODES=0
export MACHINE_TYPE=n1-standard-2
export KUBERNETES_VERSION=1.16.8-gke.15
export NETWORK=<NETWORK_NAME>
export SUBNETWORK=<SUBNETWORK_NAME>
gcloud container - project ${PROJECT_NAME} clusters create ${CLUSTER_NAME} \
- zone ${COMPUTE_ZONE} \
- cluster-version ${KUBERNETES_VERSION} \
- machine-type ${MACHINE_TYPE} \
- num-nodes ${NUM_NODES} \
- enable-autoscaling \
- max-nodes=${MAX_NODES} \
- min-nodes=${MIN_NODES} \
# If you use Shared VPC architecture to bind together multiple projects, we need to specify these options
- network "projects/${PROJECT_NAME}/global/networks/${NETWORK}" \
- subnetwork "projects/${PROJECT_NAME}/regions/${COMPUTE_REGION}/subnetworks/${SUBNETWORK}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment