-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
k8s_create_cluster_on_gcloud.sh
32 lines (31 loc) · 1.31 KB
/
k8s_create_cluster_on_gcloud.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Create K8S cluster
```
gcloud beta container \
--project "fit-fin-309510" clusters create "shortlink" \
--zone "us-central1-c" \
--no-enable-basic-auth \
--cluster-version "1.20.6-gke.1000" \
--release-channel "rapid" \
--machine-type "e2-medium" \
--image-type "COS_CONTAINERD" \
--disk-type "pd-standard" \
--disk-size "100" \
--metadata disable-legacy-endpoints=true \
--scopes "https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly","https://www.googleapis.com/auth/trace.append" \
--num-nodes "4" \
--enable-stackdriver-kubernetes \
--enable-ip-alias \
--network "projects/fit-fin-309510/global/networks/default" \
--subnetwork "projects/fit-fin-309510/regions/us-central1/subnetworks/default" \
--no-enable-intra-node-visibility \
--default-max-pods-per-node "110" \
--enable-dataplane-v2 \
--no-enable-master-authorized-networks \
--addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver \
--enable-autoupgrade \
--enable-autorepair \
--max-surge-upgrade 1 \
--max-unavailable-upgrade 0 \
--enable-shielded-nodes \
--node-locations "us-central1-c"
```