Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 1.78 KB

README.md

File metadata and controls

72 lines (59 loc) · 1.78 KB

Overview

Terraform configuration for creating a GCP Google Kubernetes Engine cluster with the permissions necessary for deploying Portworx to.

Prerequisites

To use this configuration you will need:

gcloud init
  • add your account to the application default credentials (ADC)
gcloud auth application-default login

Deploying The Configuration

  1. Create a terraform.tfvars files containing the following line:
project_id=<project id goes here>
  1. By default the configuration will create a three node cluster:
  • in the europe-west2 region
  • with three worker nodes based on e2-standard-8 compute instances
  • 1.22.12-gke.2300 kubernetes version

If these default values are acceptable proceed to step 3, otherwise add the following lines to the terraform.tfvars file:

region=<region name goes here>
machine_type=<compute instance type goes here>
kubernetes_version=<cluster name prefix goes here>
  1. Initialise the configuration:
terraform init
  1. This step is optional, inspect the resources that the configuration will create:
terraform plan  
  1. Deploy the configuration:
terraform apply -auto-approve

Kubeconfig File Creation

  1. Install the gke plugin:
gcloud components install gke-gcloud-auth-plugin
  1. Check the gke-gcloud-auth-plugin binary version:
gke-gcloud-auth-plugin --version
  1. Update your kubeconfig:
gcloud container clusters get-credentials <cluster_name> --region <region>

Destroying The Resources Deployed By The Configuration

terraform destroy -auto-approve