Skip to content

Deploy a Kubernetes cluster on GCP using this small script

Notifications You must be signed in to change notification settings

hdospitia/kubernetes-cluster-gcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Launch Kubernetes cluster on GCP

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

launch

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.

list

This option presents you the running clusters launched using this script reading from the ~/.launch-cluster.state file.

destroy

Choosing the destroy option, it will destroy the cluster that you pass as argument and delete it from the ~/.launch-cluster.state file.

cleanup

When you decide to delete all the clusters created with this script, you use this option.

help

This will show you a brief usage of this script.

Examples

For launching a cluster:

./launch-cluster.sh launch

For destroying a cluster:

./launch-cluster.sh destroy <cluster-name>

Any contribution is welcome!

About

Deploy a Kubernetes cluster on GCP using this small script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages