Modular Kubernetes Cluster for GCE.
module "k8s" {
source = "github.com/GoogleCloudPlatform/terraform-google-k8s-gce"
name = "dev"
network = "k8s"
region = "${var.region}"
zone = "${var.zone}"
k8s_version = "1.8.1"
num_nodes = "${var.num_nodes}"
}name(required): The name of the kubernetes cluster. Note that nodes names will be prefixed withk8s-.k8s_version(optional): The version of kubernetes to use. See available versions using:apt-cache madison kubelet. Default is1.7.3cni_version(optional): The version of the kubernetes cni resources to install. See available versions using:apt-cache madison kubernetes-cni. Default is0.5.1.docker_version(optional): The version of Docker to install. See available versions using:apt-cache madison docker-ce. Default is17.06.0dashboard_version(optional): The version tag of the kubernetes dashboard, per the tags in the repo: https://github.com/kubernetes/dashboard. Default isv1.6.3.compute_image(optional): The project/image to use on the master and nodes. Must be ubuntu or debian 8+ compatible. Default isubuntu-os-cloud/ubuntu-1704.network(optional): The network to deploy to. Default isdefault.subnetwork(optional): The subnetwork to deploy to. Default isdefault.region(optional): The region to create the cluster in. Default isus-central1zone(optional): The zone to create the cluster in.. Default isus-central1-f.access_config(optiona): The access config block for the instances. Set to[]to remove external IP. Default is[{}]master_machine_type(optional): The machine tyoe for the master node. Default isn1-standard-4.node_machine_type(optional): The machine tyoe for the nodes. Default isn1-standard-4.num_nodes(optional): The number of nodes. Default is3.add_tags(optional): Additional list of tags to add to the nodes.master_ip(optional): The internal IP of the master node. Note this must be in the CIDR range of the region and zone. Default is10.128.0.10.pod_cidr(optional): The CIDR for the pod network. The master will allocate a portion of this subnet for each node. Default is10.40.0.0/14.service_cidr(optional): The CIDR for the service network. Default is10.25.240.0/20.dns_ip(optional): The IP of the kube DNS service, must live within the service_cidr. Default is10.25.240.10.depends_id(optional): The ID of a resource that the instance group depends on. This is added as metadatatf_depends_idon each instance.pod_network_type(optional): The type of networking to use for inter-pod traffic. Either kubenet or calico.calico_version(optional): Version of Calico to install for pod networking. Major and minor version only, example:2.4or2.6.
master_ip: The internal address of the master.depends_id: Id of the master managed instance groupdepends_idoutput variable used for intra-module dependency creation.
module.master-mig: Managed instance group for the master node.module.default-pool-mig: Managed instance group for the nodes.google_compute_firewall.k8s-all: Firewall rule to allow all traffic on the pod network.