Skip to content

Instantly share code, notes, and snippets.

@sasaken555
Created May 25, 2019 11:57
Show Gist options
  • Save sasaken555/94c5b6c3e9ff75290f216a96c7f9ba2e to your computer and use it in GitHub Desktop.
Save sasaken555/94c5b6c3e9ff75290f216a96c7f9ba2e to your computer and use it in GitHub Desktop.
GKE setup and cleanup scripts.
#!/bin/bash
CLUSTER_NAME=$1
echo ">>> Delete Cluster starged..."
gcloud container clusters delete $CLUSTER_NAME
echo ">>> All delete process are finished!!"
#!/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