Skip to content

kusznerr/sample-gke-terraform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-gke-terraform

sample gke cluster for play and fun.

Setting up argoCD

As an option, there is a possibility to add in ArgoCD /w app-of-apps pattern. Please see separate deployment instructions under argo folder.

Simple Regional Cluster

Simple GKE cluster with output of kubeconfig

Inputs

Name Description Type Default Required
cluster_name_suffix A suffix to append to the default cluster name string "" no
compute_engine_service_account Service account to associate to the nodes in the cluster any n/a yes
ip_range_pods The secondary ip range to use for pods any n/a yes
ip_range_services The secondary ip range to use for services any n/a yes
network The VPC network to host the cluster in any n/a yes
project_id The project ID to host the cluster in any n/a yes
region The region to host the cluster in any n/a yes
skip_provisioners Flag to skip local-exec provisioners bool false no
subnetwork The subnetwork to host the cluster in any n/a yes

Outputs

Name Description
ca_certificate n/a
client_token n/a
cluster_name Cluster name
ip_range_pods The secondary IP range used for pods
ip_range_services The secondary IP range used for services
kubeconfig_raw n/a
kubernetes_endpoint n/a
location n/a
master_kubernetes_version The master Kubernetes version
network n/a
project_id n/a
region n/a
service_account The default service account used for running nodes.
subnetwork n/a
zones List of zones in which the cluster resides

To provision this example, run the following from within this directory:

  • gcloud auth application-default login --project [gcp-project-name] to set the google context Reference material here
  • terraform init to get the plugins
  • terraform plan to see the infrastructure plan
  • terraform apply to apply the infrastructure build
  • terraform destroy to destroy the built infrastructure

To use the cluster from kubectl do following:

  • gcloud container clusters get-credentials CLUSTER_NAME add in new context in your $home/.kube/config Reference material here

About

sample gke cluster for play and fun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages