Skip to content

Terraform configuration for spinning up a GKE cluster with helm

Notifications You must be signed in to change notification settings

SujithKasireddy/terraform-gke-helm

 
 

Repository files navigation

terraform-gke-helm

Terraform configuration for spinning up a Google kubernetes engine cluster with helm

  1. Fill the terraform.tfvars with your own variables

  2. Log in to gcloud cli and set the default project which you have previously created on GCP Dashboard

gcloud auth application-default login
export GOOGLE_PROJECT=$(gcloud config get-value project)
  1. After terraform apply: point your kubeconfig file to the recently created gke cluster
gcloud container clusters get-credentials $(terraform output cluster_name) --zone $(terraform output cluster_zone)
  1. Install helm
kubectl get pods -n dev

helm init --upgrade
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'

About

Terraform configuration for spinning up a GKE cluster with helm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HCL 100.0%