You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- security group id can be provided for either/both of the cluster and the workers. If not provided, security groups will be created with sufficient rules to allow cluster-worker communication. - kudos to @tanmng on the idea ⭐
13
+
- outputs of security group ids and worker ASG arns added for working with these resources outside the module.
14
+
15
+
### Changed
16
+
17
+
- Worker build out refactored to allow multiple autoscaling groups each having differing specs. If none are given, a single ASG is created with a set of sane defaults - big thanks to @kppullin 🥨
- ability to specify extra userdata code to execute following kubelet services start.
24
+
- EBS optimization used whenever possible for the given instance type.
25
+
- When `configure_kubectl_session` is set to true the current shell will be configured to talk to the kubernetes cluster using config files output from the module.
26
+
10
27
### Changed
11
28
12
29
- files rendered from dedicated templates to separate out raw code and config from `hcl`
13
30
-`workers_ami_id` is now made optional. If not specified, the module will source the latest AWS supported EKS AMI instead.
14
-
- added ability to specify extra userdata code to execute after the second to configure and start kube services.
15
-
- When `configure_kubectl_session` is set to true the current shell will be configured to talk to the kubernetes cluster using config files output from the module.
16
-
- EBS optimization used whenever possible for the given instance type.
* You want to create a set of resources around an EKS cluster: namely an autoscaling group of workers and a security group for them.
17
-
* You've created a Virtual Private Cloud (VPC) and subnets where you intend to put this EKS.
15
+
* You want to create an EKS cluster and an autoscaling group of workers for the cluster.
16
+
* You want these resources to exist within security groups that allow communication and coordination. These can be user provided or created within the module.
17
+
* You've created a Virtual Private Cloud (VPC) and subnets where you intend to put the EKS resources.
18
18
19
19
## Usage example
20
20
@@ -28,7 +28,6 @@ module "eks" {
28
28
subnets = ["subnet-abcde012", "subnet-bcde012a"]
29
29
tags = "${map("Environment", "test")}"
30
30
vpc_id = "vpc-abcde012"
31
-
cluster_ingress_cidrs = ["24.18.23.91/32"]
32
31
}
33
32
```
34
33
@@ -52,8 +51,10 @@ This module has been packaged with [awspec](https://github.com/k1LoW/awspec) tes
52
51
3. Ensure your AWS environment is configured (i.e. credentials and region) for test.
53
52
4. Test using `bundle exec kitchen test` from the root of the repo.
54
53
55
-
For now, connectivity to the kubernetes cluster is not tested but will be in the future.
56
-
To test your kubectl connection manually, see the [eks_test_fixture README](https://github.com/terraform-aws-modules/terraform-aws-eks/tree/master/examples/eks_test_fixture/README.md).
54
+
For now, connectivity to the kubernetes cluster is not tested but will be in the
55
+
future. If `configure_kubectl_session` is set`true`, once the test fixture has
56
+
converged, you can query the test cluster from that terminal session with
57
+
`kubectl get nodes --watch --kubeconfig kubeconfig`.
57
58
58
59
## Doc generation
59
60
@@ -93,30 +94,28 @@ MIT Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraform-a
93
94
94
95
| Name | Description | Type | Default | Required |
95
96
|------|-------------|:----:|:-----:|:-----:|
96
-
| additional_userdata | Extra lines of userdata (bash) which are appended to the default userdata code. | string | `` | no |
97
-
| cluster_ingress_cidrs | The CIDRs from which we can execute kubectl commands. | list | - | yes |
98
-
| cluster_name | Name of the EKS cluster which is also used as a prefix in names of related resources. | string | - | yes |
99
-
| cluster_version | Kubernetes version to use for the cluster. | string | `1.10` | no |
97
+
| cluster_name | Name of the EKS cluster. Also used as a prefix in names of related resources. | string | - | yes |
98
+
| cluster_security_group_id | If provided, the EKS cluster will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the workers and provide API access to your current IP/32. | string | `` | no |
99
+
| cluster_version | Kubernetes version to use for the EKS cluster. | string | `1.10` | no |
100
100
| config_output_path | Determines where config files are placed if using configure_kubectl_session and you want config files to land outside the current working directory. | string | `./` | no |
101
-
| configure_kubectl_session | Configure the current session's kubectl to use the instantiated cluster. | string |`false`| no |
102
-
| ebs_optimized_workers | If left at default of true, will use ebs optimization if available on the given instance type. | string |`true`| no |
103
-
| subnets | A list of subnets to associate with the cluster's underlying instances. | list | - | yes |
101
+
| configure_kubectl_session | Configure the current session's kubectl to use the instantiated EKS cluster. | string |`true`| no |
102
+
| subnets | A list of subnets to place the EKS cluster and workers within. | list | - | yes |
104
103
| tags | A map of tags to add to all resources. | string |`<map>`| no |
105
-
| vpc_id | VPC id where the cluster and other resources will be deployed. | string | - | yes |
106
-
| workers_ami_id | AMI ID for the eks workers. If none is provided, Terraform will search for the latest version of their EKS optimized worker AMI. | string | `` | no |
107
-
| workers_asg_desired_capacity | Desired worker capacity in the autoscaling group. | string | `1` | no |
108
-
| workers_asg_max_size | Maximum worker capacity in the autoscaling group. | string | `3` | no |
109
-
| workers_asg_min_size | Minimum worker capacity in the autoscaling group. | string | `1` | no |
110
-
| workers_instance_type | Size of the workers instances. | string | `m4.large` | no |
104
+
| vpc_id | VPC where the cluster and workers will be deployed. | string | - | yes |
105
+
| worker_groups | A list of maps defining worker group configurations. See workers_group_defaults for valid keys. | list |`<list>`| no |
106
+
| worker_security_group_id | If provided, all workers will be attached to this security group. If not given, a security group will be created with necessary ingres/egress to work with the EKS cluster. | string |``| no |
107
+
| workers_group_defaults | Default values for target groups as defined by the list of maps. | map |`<map>`| no |
111
108
112
109
## Outputs
113
110
114
111
| Name | Description |
115
112
|------|-------------|
116
-
| cluster_certificate_authority_data | Nested attribute containing certificate-authority-data for your cluster. Tis is the base64 encoded certificate data required to communicate with your cluster. |
117
-
| cluster_endpoint | The endpoint for your Kubernetes API server. |
118
-
| cluster_id | The name/id of the cluster. |
119
-
| cluster_security_group_ids | description |
120
-
| cluster_version | The Kubernetes server version for the cluster. |
121
-
| config_map_aws_auth | A kubernetes configuration to authenticate to this cluster. |
122
-
| kubeconfig | kubectl config file contents for this cluster. |
113
+
| cluster_certificate_authority_data | Nested attribute containing certificate-authority-data for your cluster. This is the base64 encoded certificate data required to communicate with your cluster. |
114
+
| cluster_endpoint | The endpoint for your EKS Kubernetes API. |
115
+
| cluster_id | The name/id of the EKS cluster. |
116
+
| cluster_security_group_id | Security group ID attached to the EKS cluster. |
117
+
| cluster_version | The Kubernetes server version for the EKS cluster. |
118
+
| config_map_aws_auth | A kubernetes configuration to authenticate to this EKS cluster. |
119
+
| kubeconfig | kubectl config file contents for this EKS cluster. |
120
+
| worker_security_group_id | Security group ID attached to the EKS workers. |
121
+
| workers_asg_arns | IDs of the autoscaling groups containing workers. |
0 commit comments