forked from lavishsheth/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Deploying Google Kubernetes Engine
14 lines (8 loc) · 1.54 KB
/
Deploying Google Kubernetes Engine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#---------CHANGE ZONE-----------
ZONE=u
REGION=${ZONE::-2}
export PROJECT_ID=$(gcloud config get-value project)
gcloud beta container --project "$PROJECT_ID" clusters create "standard-cluster-1" --zone $ZONE --no-enable-basic-auth --cluster-version "1.27.3-gke.100" --release-channel "regular" --machine-type "e2-medium" --image-type "COS_CONTAINERD" --disk-type "pd-balanced" --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 "3" --logging=SYSTEM,WORKLOAD --monitoring=SYSTEM --enable-ip-alias --network "projects/$PROJECT_ID/global/networks/default" --subnetwork "projects/$PROJECT_ID/regions/$REGION/subnetworks/default" --no-enable-intra-node-visibility --default-max-pods-per-node "110" --security-posture=standard --workload-vulnerability-scanning=disabled --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing,GcePersistentDiskCsiDriver --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0 --binauthz-evaluation-mode=DISABLED --enable-managed-prometheus --enable-shielded-nodes --node-locations "$ZONE"
gcloud container clusters resize standard-cluster-1 --num-nodes=4 --zone $ZONE
#-----PRESS Y -----
kubectl create deployment nginx-1 --image=nginx:latest