Terraform Scripts for all Labs in A Cloud Guru Course: Google Kubernetes Engine Beginner to Pro.
Prequisites:
- gcloud
- docker
- helm 3
- Set vars in
terraform.tfvars
. - Comments all modules parts on
main.tf
. - Run
terraform apply
. - Then replace
{uid_prefix}
by yours fromterraform.tfvars
.and run commands below:
uid_prefix=your-uid-prefix
for tag in $(ls docker_images/myapp); do
docker build -t gcr.io/${uid_prefix}-acg-gke/myapp:${tag} ./docker_images/myapp/${tag}
docker push gcr.io/${uid_prefix}-acg-gke/myapp:${tag}
done
- Download kubemci:
wget https://storage.googleapis.com/kubemci-release/release/latest/bin/linux/amd64/kubemci
chmod a+x ./kubemci
- Uncomments modules on
main.tf
. - Run
terraform apply
.