Skip to content

Latest commit

 

History

History

cluster

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

cluster

This is top level module creates resource group, vnet, subnets and aks cluster by calling vpc_and_subnets and gke modules.

Summary

This module creates following resources -

  • VPC
  • Subnet
  • GKE Cluster with a worker nodepool if no nodepool specificed
  • OR Optionally can create more worker nodepools

Requirements

No requirements.

Providers

No providers.

Modules

Name Source Version
gke_with_node_group gke n/a
vpc_with_subnets vpc_with_subnets n/a

Resources

No resources.

Inputs

Name Description Type Default Required
cidrBlock The cidr block for subnet string "10.1.0.0/16" no
cluster_name vpc, subnet and gke cluster name string n/a yes
k8s_version kubernetes version string "1.27" no
nodepools Nodepools for the Kubernetes cluster
map(object({
name = string
node_count = number
node_labels = map(any)
machine_type = string
}))
{
"worker": {
"machine_type": "n1-standard-1",
"name": "worker",
"node_count": 1,
"node_labels": {
"worker-name": "worker"
}
}
}
no
region gcp region where the gke cluster must be created, this region should match where you have created the vpc and subnet string n/a yes

Outputs

Name Description
client_certificate Base64 encoded public certificate used by clients to authenticate to the Kubernetes cluster.
client_key Base64 encoded private key used by clients to authenticate to the cluster endpoint.
cluster_ca_certificate Base64 encoded public certificate that is the root certificate of the cluster.
cluster_id an identifier for the resource with format projects/{{project}}/locations/{{zone}}/clusters/{{name}}
cluster_master_version The current version of the master in the cluster. This may be different than the min_master_version set in the config if the master has been updated by GKE.
endpoint The IP address of this cluster's Kubernetes master.
subnet_self_link The URI of the created resource
vpc_self_link The URI of the created resource