diff --git a/k8s/gcp/k8s-installer/README.md b/k8s/gcp/k8s-installer/README.md new file mode 100644 index 000000000..9b3a42038 --- /dev/null +++ b/k8s/gcp/k8s-installer/README.md @@ -0,0 +1,52 @@ +# GCP platform specific code and scripts +## Google Cloud provisioning and setting up Kubernetes cluster using KOPS +These playbook act as a wrapper class for all the `kops`, `gsutil` & `gcloud` command. + +### Prerequisites +- kubectl +- gcloud +- kops + +### Setting up + +- Run `glcloud init`, and authenticate into your google account linked with the Google Cloud + +--- + +### Running + +- Run `create-vpc.yml` using anisble-playbook, that will create a Virtual Private Cloud +```bash +ansible-playbook create-vpc.yml --extra-vars "project= vpc_name=" +``` + +- Run `create-k8s-cluster`, this will create a Bucket and the cluster + +```bash +ansible-playbook create-k8s-cluster.yml -vv --extra-vars "project= nodes=1 vpc_name=" +``` +**Optional --extra-vars** + +> k8s_version=1.11.1 +> cluster_name=my-Cluster + +--- + +### Deleting the cluster + +- Run `delete-k8s-cluster`, this will delete the cluster as well as the Bucket associated + +```bash +ansible-playbook delete-k8s-cluster.yml +``` +**Optional --extra-vars** + +> cluster_name=my-Cluster + +It will delete the cluster specified else it will delete the last created cluster + +- Run `delete-vpc` to delete the existing VPC (if required) +```bash +ansible-playbook delete-vpc.yml --extra-vars "project= vpc_name=" +``` +