Terraform codes for launching a managed Kubernetes Cluster on AWS EKS.
$ terraform init
$ terraform validate
$ terraform apply
Name | Version |
---|---|
terraform | >= 0.12 |
aws | ~> 2.0 |
Name | Version |
---|---|
aws | ~> 2.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
additional_tags | Additional tags to apply to node group | map |
{ |
no |
asg_desired_capacity | Desired worker capacity in the autoscaling group and changing its value will not affect the autoscaling group's desired capacity because the cluster-autoscaler manages up and down scaling of the nodes. Cluster-autoscaler add nodes when pods are in pending state and remove the nodes when they are not required by modifying the desirec_capacity of the autoscaling group. Although an issue exists in which if the value of the asg_min_size is changed it modifies the value of asg_desired_capacity. | number |
1 |
no |
asg_max_size | Maximum worker capacity in the autoscaling group. | number |
1 |
no |
asg_min_size | Minimum worker capacity in the autoscaling group. NOTE: Change in this paramater will affect the asg_desired_capacity, like changing its value to 2 will change asg_desired_capacity value to 2 but bringing back it to 1 will not affect the asg_desired_capacity. | number |
1 |
no |
bootstrap_extra_args | Extra arguments passed to the bootstrap.sh script from the EKS AMI (Amazon Machine Image). | string |
"--enable-docker-bridge true" |
no |
cluster_endpoint_private_access | Indicates whether or not the Amazon EKS private API server endpoint is enabled. | bool |
true |
no |
cluster_endpoint_public_access | Indicates whether or not the Amazon EKS public API server endpoint is enabled. | bool |
false |
no |
cluster_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string |
"peacock" |
no |
cluster_version | Kubernetes version to use for the EKS cluster. | string |
"1.16" |
no |
environment | The environment type of your cluster. | string |
"production" |
no |
iam_path | If provided, all IAM roles will be created on this path. | string |
"/" |
no |
kubeconfig_path | Where to save the Kubectl config file. | string |
"~/.kube/config" |
no |
kubelet_extra_args | This string is passed directly to kubelet if set. Useful for adding labels or taints. | string |
"--node-labels=node.kubernetes.io/lifecycle=normal" |
no |
region | The AWS region you'd like to deploy the cluster in. | string |
"us-east-2" |
no |
root_iops | The amount of provisioned IOPS. This must be set with a volume_type of 'io1'. | number |
0 |
no |
root_volume_size | Root volume size of workers instances. | number |
100 |
no |
root_volume_type | Root volume type of workers instances, can be 'standard', 'gp2', or 'io1' | string |
"gp2" |
no |
vpc_name | VPC where the cluster and workers will be deployed. | string |
"default" |
no |
write_kubeconfig | Whether to write a Kubectl config file containing the cluster configuration. | bool |
true |
no |
No output.