Skip to content

itsyndicate/terragrunt-gke-standard-quick-start

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

This terragrunt code lets you create standard GKE cluster along with additional resources.

Before proceeding

Make sure you have changed backend bucket in root terragrunt.hcl and specified your project id in dev/common.hcl. Also make sure you have created service account with all the necessary permissions and generated service account key. Also don't forget to check if you have enabled Resource Manager and GKE APIs in Google Cloud Platform.

Getting Started

First things first, build toolkit image for quick start. It simply installs all the necessary tools. Then run the container and open bash session:

docker build -t gke-standard -f ./Dockerfile.toolkit .
docker run -it --name gke-standard gke-standard bash

Then create /terraform/key.json and pass the content of service account json key file. Next export GOOGLE_APPLICATION_CREDENTIALS environment variable and navigate to dev/ directory:

export GOOGLE_APPLICATION_CREDENTIALS=/terraform/key.json
cd dev

Run the following commands to initialize terraform modules, check and then apply changes:

terragrunt run-all init
terragrunt run-all plan
terragrunt run-all apply

That's it, your cluster will be created in a few minutes. You can get kubeconfig using gcloud:

gcloud container clusters get-credentials CLUSTER_NAME

Additional Resources Created

  • VPC
  • Subnet with two secondary ranges
  • External address
  • Cloud Nat
  • Service account for nodes in node pool

About

Terragrunt configs for quick GKE standard cluster setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages