All Projects → jetstack → Terraform Google Gke Cluster

jetstack / Terraform Google Gke Cluster

Licence: apache-2.0
A Terraform module to create a best-practise Google Kubernetes Engine (GKE) cluster.

Projects that are alternatives of or similar to Terraform Google Gke Cluster

Docs Examples
Open in Cloud Shell Examples for the Google provider docs
Stars: ✭ 50 (-62.41%)
Mutual labels:  google, terraform, hcl
Terraform Aws Kubernetes
Install a Kubernetes cluster the CoreOS Tectonic Way: HA, self-hosted, RBAC, etcd Operator, and more
Stars: ✭ 118 (-11.28%)
Mutual labels:  terraform, hcl
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (-11.28%)
Mutual labels:  terraform, hcl
Terragrunt Atlantis Config
Generate Atlantis config for Terragrunt projects.
Stars: ✭ 131 (-1.5%)
Mutual labels:  terraform, hcl
Terraform Up And Running Code
Code samples for the book "Terraform: Up & Running" by Yevgeniy Brikman
Stars: ✭ 1,739 (+1207.52%)
Mutual labels:  terraform, hcl
Terraform Null Ansible
Terraform Module to run ansible playbooks
Stars: ✭ 114 (-14.29%)
Mutual labels:  terraform, hcl
Terraform Aws Key Pair
Terraform Module to Automatically Generate SSH Key Pairs (Public/Private Keys)
Stars: ✭ 121 (-9.02%)
Mutual labels:  terraform, hcl
Aws Ecs Airflow
Run Airflow in AWS ECS(Elastic Container Service) using Fargate tasks
Stars: ✭ 107 (-19.55%)
Mutual labels:  terraform, hcl
Hybrid multicloud overlay
MutiCloud_Overlay demonstrates a use case of overlay over one or more clouds such as AWS, Azure, GCP, OCI, Alibaba and a vSphere private infrastructure in Hub and spoke topology, point to point topology and in a Single cloud. Overlay protocols IPv6 and IPv4 are independent of underlying infrastructure. This solution can be integrated with encryption and additional security features.
Stars: ✭ 127 (-4.51%)
Mutual labels:  terraform, hcl
Reference Architectures
[WIP] Get up and running quickly with one of our reference architecture using our fully automated cold-start process.
Stars: ✭ 127 (-4.51%)
Mutual labels:  terraform, hcl
Multi Env Deploy
Complete example of deploying complex web apps to AWS using Terraform, Ansible, and Packer
Stars: ✭ 132 (-0.75%)
Mutual labels:  terraform, hcl
Terraform Config
Terraform bits and bytes
Stars: ✭ 111 (-16.54%)
Mutual labels:  terraform, hcl
Terraform Aws Ecr
Terraform Module to manage Docker Container Registries on AWS ECR
Stars: ✭ 110 (-17.29%)
Mutual labels:  terraform, hcl
Hello Lambda
🔥 An example of a Python (AWS) Lambda exposed with API Gateway, configured with Terraform.
Stars: ✭ 114 (-14.29%)
Mutual labels:  terraform, hcl
Terraform Aws Config
Enables AWS Config and adds managed config rules with good defaults.
Stars: ✭ 107 (-19.55%)
Mutual labels:  terraform, hcl
Terraform
Terraform automation for Cloud
Stars: ✭ 121 (-9.02%)
Mutual labels:  terraform, hcl
Terraform Aws Spotgpu
Fully automated provisioning of AWS EC2 Spot Instances for Deep Learning workloads using Terraform.
Stars: ✭ 127 (-4.51%)
Mutual labels:  terraform, hcl
Typhoon
Minimal and free Kubernetes distribution with Terraform
Stars: ✭ 1,397 (+950.38%)
Mutual labels:  terraform, hcl
Terraform Aws Dynamic Subnets
Terraform module for public and private subnets provisioning in existing VPC
Stars: ✭ 106 (-20.3%)
Mutual labels:  terraform, hcl
Terraform Aws Eks
Deploy a full EKS cluster with Terraform
Stars: ✭ 125 (-6.02%)
Mutual labels:  terraform, hcl

Terraform Google GKE Cluster

A Terraform module to create a best-practice Google Kubernetes Engine (GKE) cluster.

This module is available on Terraform registry.

The module is designed to be used by Jetstack customers to make it easier for them to create clusters that are secure and follow Jetstack recommendations. It gives them flexibility with certain properties so the cluster can be customised to their needs, but gives fixed values for properties that could lead to issues or insecurity.

Deprecation

⚠️ The 0.3 release of this module is planned to be the final release. ⚠️

After this the module will be deprecated in favour of Google's GKE module. Jetstack will be producing an example project using Google's module as well as migration guidance.

Requirements

The module requires an existing Google Cloud project, with VPC network and subnetwork for the cluster to use. The subnetwork must be in the same region as the cluster and have pod and service ranges specified.

Customisable Properties

The module allows the cluster to be extensively customised using input variables. These can be found with documentation in variables.tf.

The customisable properties include:

  • Release channel or minimum master version
  • Private nodes
  • Master private endpoint
  • Master authorised network CIDR blocks
  • Master CIDR block
  • Node service account container registry access
  • Google security group for RBAC
  • Workload identity namespace
  • Enable Stackdriver logging and monitoring
  • Enable Google Cloud HTTP load balancing
  • Enable pod security policy controller
  • Daily maintenance window start time
  • Node pools
    • Name
    • Inital node count
    • Minimum and maximum number of nodes for autoscaling
    • Enable automatic repair and upgrade
    • Machine type
    • Disk size and type
    • Use preemptible nodes
    • Kubernetes version

Fixed Arguments

Some of the properties of the cluster are fixed based on Jetstack's recommended best-practice settings:

  • Enabling network policy for nodes and master using Calico.
  • Disabling basic authentication and client certificate issuing.
  • Disabling Kubernetes dashboard (Google Cloud Console should be used instead).
  • Use of VPC native networking (using a specified network and subnetwork).
  • Removing the default node pool and creating one or more new pools with Terraform for easier management.
  • Setting the OAuth scope of nodes to cloud-platform to manage permissions with IAM.
  • Disabling node legacy endpoints.
  • Creating an IAM service account for nodes with the minimum required roles:
    • Logging log writer
    • Monitoring metric writer
    • Monitoring viewer

Usage

The module itself is located in the root of this repo, and is designed to be used as part of a larger Terraform project. It can be used directly from the Terraform Registry like so:

module "gke-cluster" {
  source  = "jetstack/gke-cluster/google"
  version = "0.3.0"

  # insert the 9 required variables here
}

Example

There is an example project in the example/ directory which can be used to test and demonstrate the module. It could also be used as the basis for your own Terraform project.

Limitations

If private nodes are used then nodes will not have direct access to the internet. This means they cannot pull images hosted outside of the container registry in the same project as the cluster. The example project features a Cloud NAT to give the nodes to access the internet.

License

This project is licensed under the Apache 2.0 License. For full details see the LICENSE file.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].