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
TODO: write CD script
- create environment folder with module (see dev environment for example).
- make sure the name of the backend bucket in
main.tf
&backend.tf
is the same. - comment out code in
backend.tf
, we don't have a state to remote yet. - when on the created env folder
terraform init # download modules & pull/create remote backend
terraform apply # create cluster/machine
- uncomment
backend.tf
, runterraform init
again and send state to remote backend.
- on cleanup
terraform destroy