Created
May 25, 2019 11:57
-
-
Save sasaken555/94c5b6c3e9ff75290f216a96c7f9ba2e to your computer and use it in GitHub Desktop.
GKE setup and cleanup scripts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLUSTER_NAME=$1 | |
echo ">>> Delete Cluster starged..." | |
gcloud container clusters delete $CLUSTER_NAME | |
echo ">>> All delete process are finished!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CLUSTER_NAME=$1 | |
echo ">>> Create Cluster starged..." | |
gcloud container clusters create $CLUSTER_NAME \ | |
--cluster-version=latest \ | |
--enable-ip-alias \ | |
--create-subnetwork name=${CLUSTER_NAME}-subnet | |
echo ">>> Get credentials to access the cluster..." | |
gcloud container clusters get-credentials $CLUSTER_NAME | |
echo ">>> Get Nodes..." | |
kubectl get nodes | |
echo ">>> All setup process are finished!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment