|
| 1 | +# Terraform Kubernetes Engine ASM Submodule |
| 2 | + |
| 3 | +This module installs [Anthos Service Mesh](https://cloud.google.com/service-mesh/docs) (ASM) in a Kubernetes cluster. |
| 4 | + |
| 5 | +Specifically, this module automates the following steps for [installing ASM](https://cloud.google.com/service-mesh/docs/install): |
| 6 | + |
| 7 | +1. Installing the ASM Istio Operator on your cluster. |
| 8 | +2. Optionally registering your cluster with GKE Hub. |
| 9 | + |
| 10 | +## Usage |
| 11 | + |
| 12 | +There is a [full example](../../examples/simple_regional_with_asm) provided. Simple usage is as follows: |
| 13 | + |
| 14 | +```tf |
| 15 | +module "asm" { |
| 16 | + source = "terraform-google-modules/kubernetes-engine/google//modules/asm" |
| 17 | +
|
| 18 | + project_id = "my-project-id" |
| 19 | + cluster_name = "my-cluster-name" |
| 20 | + location = module.gke.location |
| 21 | + cluster_endpoint = module.gke.endpoint |
| 22 | +} |
| 23 | +``` |
| 24 | + |
| 25 | +To deploy this config: |
| 26 | +1. Run `terraform apply` |
| 27 | + |
| 28 | +## Requirements |
| 29 | + |
| 30 | +- Anthos Service Mesh [requires](https://cloud.google.com/service-mesh/docs/gke-install-existing-cluster#requirements) an active Anthos license. |
| 31 | +- GKE cluster must have minimum four nodes. |
| 32 | +- Minimum machine type is `e2-standard-4`. |
| 33 | +- GKE cluster must be enrolled in a release channel. ASM does not support static version. |
| 34 | +- ASM on a private GKE cluster requires adding a firewall rule to open port 15017 if you want to use [automatic sidecar injection](https://cloud.google.com/service-mesh/docs/proxy-injection). |
| 35 | +- Only one ASM per Google Cloud project is supported. |
| 36 | + |
| 37 | + |
| 38 | + <!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
| 39 | +## Inputs |
| 40 | + |
| 41 | +| Name | Description | Type | Default | Required | |
| 42 | +|------|-------------|:----:|:-----:|:-----:| |
| 43 | +| cluster\_endpoint | The GKE cluster endpoint. | string | n/a | yes | |
| 44 | +| cluster\_name | The unique name to identify the cluster in ASM. | string | n/a | yes | |
| 45 | +| enable\_gke\_hub\_registration | Enables GKE Hub Registration when set to true | bool | `"true"` | no | |
| 46 | +| gke\_hub\_membership\_name | Memebership name that uniquely represents the cluster being registered on the Hub | string | `"gke-asm-membership"` | no | |
| 47 | +| gke\_hub\_sa\_name | Name for the GKE Hub SA stored as a secret `creds-gcp` in the `gke-connect` namespace. | string | `"gke-hub-sa"` | no | |
| 48 | +| location | The location (zone or region) this cluster has been created in. | string | n/a | yes | |
| 49 | +| project\_id | The project in which the resource belongs. | string | n/a | yes | |
| 50 | +| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no | |
| 51 | + |
| 52 | + <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
0 commit comments