gke_cluster
airasia/gke_cluster/google
Terraform module for a GKE Kubernetes Cluster in GCP
Terraform module for a GKE Kubernetes Cluster in GCP Using Helm Charts to install Ingress Nginx If you want to utilize this feature make sure to declare a helm provider in your terraform configuration as follows. ``terraform provider "helm" { version = "2.1.2" # see https://github.com/terraform-providers/terraform-provider-helm/releases kubernetes { host = module.gke_cluster.cluster_endpoint token = data.google_client_config.google_client.access_token cluster_ca_certificate = module.gke_cluster.cluster_ca_certificate } } ` Pay attention to the gke_cluster module output variables used here. kubelet_config Configuration This module supports kubelet configuration through the kubelet_config parameter in node_pools. Supported Parameters The parameters are compatible with Google provider version
| Name | Type | Description | Default |
|---|---|---|---|
| vpc_network | string | A reference (self link) to the VPC network to host the cluster in. | required |
| name_suffix | string | An arbitrary suffix that will be added to the resource name(s) for distinguishin | required |
| vpc_subnetwork | string | A reference (self link) to the subnetwork to host the cluster in. | required |
| pods_ip_range_name | string | Name of subnet's secondary IP range for hosting k8s pods. | required |
| services_ip_range_name | string | Name of subnet's secondary IP range for hosting k8s services. | required |
| locations | list(string) | Accepts a list of one or more zone-letters from among "a", "b", "c" or "d". Defa | [
"a"
] |
| enable_vertical_pod_autoscaling | bool | Whether to enable Vertical Pod Autoscaling which autoscales based on usage of po | false |
| maintenance_window | object({ start_time_utc = | The time windows when GKE can be allowed to perform maintenance ops like version | {
"days_of_week": "MO,TU,WE,TH,FR",
|
| firewall_ingress_ports | list(string) | Additional ports (on cluster nodes) that should be allowed via firewall rules to | [] |
| enable_public_endpoint | bool | Allows access through the public endpoint of cluster master. Keep it 'true' if y | true |
| namespaces | list(object({ name | A list of namespaces to be created in kubernetes. A map of secrets can be includ | [] |
| enable_addon_horizontal_pod_autoscaling | bool | Whether to enable Horizontal Pod Autoscaling addon which autoscales based on usa | true |
| max_surge | number | Max number of node(s) that can be over-provisioned while the GKE cluster is unde | 1 |
| maintenance_exclusions | list(object({ exclusion_na | A maintenance exclusion is a non-repeating window of time during which automatic | [] |
| node_pool_timeout | string | how long a node pool operation is allowed to take before being considered a fail | "30m" |
| ingress_ip_names | list(string) | Arbitrary names for list of static Ingress IPs to be created for the GKE cluster | [] |
| max_unavailable | number | Max number of node(s) that can be allowed to be unavailable while the GKE cluste | 0 |
| namespace_timeout | string | how long a k8s namespace operation is allowed to take before being considered a | "5m" |
| master_authorized_networks | list(object({ cidr_block | External networks that can access the cluster master(s) through HTTPS. | [] |
| enable_addon_http_load_balancing | bool | Whether to enable HTTP (L7) load balancing controller addon. | true |
| cluster_name | string | An arbitrary name to identify the k8s cluster. | "k8s" |
| min_master_version | string | The "minimum" version number that should be used by the GKE cluster master (a.k. | "1.18.17-gke.1900" |
| cluster_monitoring_service | string | The monitoring service to be used by the GKE cluster. | "monitoring.googleapis.com/kubernetes" |
| master_private_ip_cidr | string | The IP range in CIDR notation to use for the hosted master network. This range w | "172.16.0.0/28" |
| location_policy | string | Location policy specifies the algorithm used when scaling-up the node pool. Loca | "BALANCED" |
| … and 4 more inputs | |||
current_master_version — Current version number of the GKE cluster master (a.k.a. the control-plane).usage_IAM_roles — Basic IAM role(s) that are generally necessary for using the resources in this module. See https://ccluster_endpoint — The IP address of the GKE cluster master (a.k.a. the control-plane).cluster_ca_certificate — Base64 encoded public certificate that is the root of trust for this cluster. Used for connecting to