Fix
parent
32884dbefc
commit
1cdde58013
|
|
@ -17,7 +17,6 @@ sudo sh -c "curl https://raw.githubusercontent.com/kadwanev/retry/master/retry -
|
||||||
attempts=0
|
attempts=0
|
||||||
while [ attempts == 0 ]
|
while [ attempts == 0 ]
|
||||||
do
|
do
|
||||||
|
|
||||||
retry -s 15 -t 20 -v '
|
retry -s 15 -t 20 -v '
|
||||||
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
||||||
jq "
|
jq "
|
||||||
|
|
@ -29,7 +28,6 @@ while [ attempts == 0 ]
|
||||||
if [ "$STATUS" == "\"STOPPING\"" ]; then echo "Cluster stopping waiting for completion" && exit 1; fi
|
if [ "$STATUS" == "\"STOPPING\"" ]; then echo "Cluster stopping waiting for completion" && exit 1; fi
|
||||||
exit 0
|
exit 0
|
||||||
'
|
'
|
||||||
|
|
||||||
cluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${GKE_CLUSTER}")')
|
cluster=$(gcloud container clusters list --project $GKE_PROJECT --format="json" | jq '.[] | select(.name == "${GKE_CLUSTER}")')
|
||||||
|
|
||||||
if [ -z "$cluster" ];
|
if [ -z "$cluster" ];
|
||||||
|
|
@ -40,7 +38,6 @@ while [ attempts == 0 ]
|
||||||
# replace this line with whatever type of cluster you want to create
|
# replace this line with whatever type of cluster you want to create
|
||||||
gcloud beta container --project $GKE_PROJECT clusters create $GKE_CLUSTER --zone $GKE_ZONE --no-enable-basic-auth --cluster-version "1.15.12-gke.2" --machine-type "custom-1-3072" --image-type "COS" --disk-type "pd-standard" --disk-size "15" --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 "1" --enable-stackdriver-kubernetes --enable-ip-alias --default-max-pods-per-node "110" --enable-autoscaling --min-nodes "0" --max-nodes "3" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
|
gcloud beta container --project $GKE_PROJECT clusters create $GKE_CLUSTER --zone $GKE_ZONE --no-enable-basic-auth --cluster-version "1.15.12-gke.2" --machine-type "custom-1-3072" --image-type "COS" --disk-type "pd-standard" --disk-size "15" --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 "1" --enable-stackdriver-kubernetes --enable-ip-alias --default-max-pods-per-node "110" --enable-autoscaling --min-nodes "0" --max-nodes "3" --no-enable-master-authorized-networks --addons HorizontalPodAutoscaling,HttpLoadBalancing --enable-autoupgrade --enable-autorepair --max-surge-upgrade 1 --max-unavailable-upgrade 0
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
retry -s 15 -t 20 -v '
|
retry -s 15 -t 20 -v '
|
||||||
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
STATUS=$(gcloud container clusters list --format="json" --project $GKE_PROJECT |
|
||||||
jq "
|
jq "
|
||||||
|
|
@ -52,7 +49,6 @@ while [ attempts == 0 ]
|
||||||
if [ "$STATUS" == "\"PROVISIONING\"" ]; then echo "Cluster provisioning waiting for available" && exit 1; fi
|
if [ "$STATUS" == "\"PROVISIONING\"" ]; then echo "Cluster provisioning waiting for available" && exit 1; fi
|
||||||
exit 0
|
exit 0
|
||||||
'
|
'
|
||||||
|
|
||||||
echo "Cluster is available"
|
echo "Cluster is available"
|
||||||
gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
|
gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
|
||||||
kubectl version
|
kubectl version
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue