This repo helps you to deploy a Kubernetes cluster in GCP using a Bash script. Cluster creation/destroy will take 4-5 minutes approximately. The script launch-cluster.sh takes one of the following arguments:
- launch
- list
- destroy
- cleanup
- help
When you pick the launch option, it will create a Kuberntes cluster with 3 e2-medium machines, named "my-test-cluster-(A RANDOM NUMBER)". You can change the name modifying the value in the "gcloud_cluster_name" variable, inside of the script before to deploy.
This option presents you the running clusters launched using this script reading from the ~/.launch-cluster.state file.
Choosing the destroy option, it will destroy the cluster that you pass as argument and delete it from the ~/.launch-cluster.state file.
When you decide to delete all the clusters created with this script, you use this option.
This will show you a brief usage of this script.
For launching a cluster:
./launch-cluster.sh launch
For destroying a cluster:
./launch-cluster.sh destroy <cluster-name>
Any contribution is welcome!