Skip to content

Latest commit

 

History

History

gke

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

terraform

init

  • add those two env variables to your shell profile (~/.zprofile or ~/.profile)
export KUBE_CONFIG_PATH=~/.kube/config
export USE_GKE_GCLOUD_AUTH_PLUGIN=False
source ~/.zprofile | source ~/.profile
  • connect to the cluster
gcloud container clusters get-credentials ${var.cluster_name} --region ${var.region} --project ${var.project_id}
  • Installations needed CLI
brew install traefik cilium-cli hubble kubectl terraform helm

CASKS

brew install --cask google-cloud-sdk

On first setup

TODO: write CD script

  1. create environment folder with module (see dev environment for example).
  2. make sure the name of the backend bucket in main.tf & backend.tf is the same.
  3. comment out code in backend.tf, we don't have a state to remote yet.
  4. when on the created env folder
terraform init  # download modules & pull/create remote backend
terraform apply # create cluster/machine
  1. uncomment backend.tf, run terraform init again and send state to remote backend.
  • on cleanup
terraform destroy

Helpers

Machine Types

Links to docs/sources