This is a Dynamic module in terraform to create GKE cluster. This module will be called from ../env/dev.tf modules file, by using this reusable module we will be able to create AKS cluster and Cluster default node pool.
- main.tf : contains all the resources which will be created with
terraform apply
command. - variables.tf : contains all the variables required to create the resources.
- outputs.tf : prints output attributes of the resources.
- AKS cluster
- Default node pool
- AKS cluster is required to configure the default node pool.
- The AKS cluster default node pool only allows name with 12 characters long, does not allow any special characters.
- Format of node pool name
<environment>nodepool
.
- Format of node pool name
Name | Version |
---|---|
azurerm | n/a |
No modules.
Name | Type |
---|---|
azurerm_kubernetes_cluster.kubernetes_cluster | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
dns_service_ip | CNI DNS service IP | string |
"10.2.0.10" |
no |
docker_bridge_cidr | CNI Docker bridge CIDR | string |
"172.17.0.1/16" |
no |
environment | Name of the environment where infrastructure being built. | string |
n/a | yes |
kubernetes_version | Version of the AKS cluster. | string |
n/a | yes |
location | Azure location where all the resources being created. | string |
n/a | yes |
max_count | Maximum Node Count | number |
n\a | yes |
min_count | Minimum Node Count | number |
n\a | yes |
name | Name is the prefix to use for resources that needs to be created. | string |
n/a | yes |
network_plugin | Network plugin type | string |
"azure" |
no |
node_count | Number of nodes to deploy | number |
n\a | yes |
private_subnet | The subnet id of the virtual network where the virtual machines will reside. | string |
n/a | yes |
resource_group_name | The name of the resource group in which the resources will be created. | string |
n/a | yes |
service_cidr | CNI service CIDR | string |
"10.2.0.0/24" |
no |
tags | A map of the tags to use on the resources that are deployed with this module. | map(string) |
{} |
no |
vm_size | Specifies the size of the virtual machine. | string |
"Standard_DS2_v2" |
no |
Name | Description |
---|---|
azurerm_kubernetes_cluster_fqdn | Azure Kubernetes cluster fqdn. |
azurerm_kubernetes_cluster_id | Azure Kubernetes cluster id |
azurerm_kubernetes_cluster_name | Azure Kubernetes cluster name. |