Skip to content

fix: clarify usage of cluster endpoint public CIDR list var#1592

Closed
schollii wants to merge 1 commit into
terraform-aws-modules:masterfrom
schollii:clarify_cluster_public_cidr_usage
Closed

fix: clarify usage of cluster endpoint public CIDR list var#1592
schollii wants to merge 1 commit into
terraform-aws-modules:masterfrom
schollii:clarify_cluster_public_cidr_usage

Conversation

@schollii

@schollii schollii commented Sep 17, 2021

Copy link
Copy Markdown

PR o'clock

Description

Fixes #1111.

If private access is false, then worker nodes have no choice but to access API server through the public access point, ie internet.

But If you set public endpoint CIDR list, their IP will be blocked (you don't have a way to determine WAN IP of nodes). So worker nodes will never join the cluster. This caused me headache so I wanted to avoid this for others.

So if you set public access = true and public SG CIDR list, you HAVE to enable private access too so the nodes can directly access the API server from within the VPC. The docs on this point in AWS are very easy to miss / not see / not remember.

Checklist

@schollii schollii changed the title clarify usage of cluster endpoint public CIDR list var fix: clarify usage of cluster endpoint public CIDR list var Sep 17, 2021
Comment thread README.md
| <a name="input_cluster_endpoint_private_access_sg"></a> [cluster\_endpoint\_private\_access\_sg](#input\_cluster\_endpoint\_private\_access\_sg) | List of security group IDs which can access the Amazon EKS private API server endpoint. To use this `cluster_endpoint_private_access` and `cluster_create_endpoint_private_access_sg_rule` must be set to `true`. | `list(string)` | `null` | no |
| <a name="input_cluster_endpoint_public_access"></a> [cluster\_endpoint\_public\_access](#input\_cluster\_endpoint\_public\_access) | Indicates whether or not the Amazon EKS public API server endpoint is enabled. When it's set to `false` ensure to have a proper private access with `cluster_endpoint_private_access = true`. | `bool` | `true` | no |
| <a name="input_cluster_endpoint_public_access_cidrs"></a> [cluster\_endpoint\_public\_access\_cidrs](#input\_cluster\_endpoint\_public\_access\_cidrs) | List of CIDR blocks which can access the Amazon EKS public API server endpoint. | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |
| <a name="input_cluster_endpoint_public_access_cidrs"></a> [cluster\_endpoint\_public\_access\_cidrs](#input\_cluster\_endpoint\_public\_access\_cidrs) | List of CIDR blocks which can access the Amazon EKS public API server endpoint. If you use this, also set `cluster_endpoint_private_access` to true otherwise the nodes will use public access point but their WAN IP will not be in the CIDR list (see _API server endpoint access options_ table in [EKS User Guide](https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html) for details). | `list(string)` | <pre>[<br> "0.0.0.0/0"<br>]</pre> | no |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move your addition into notes section in README.

The documentation for inputs is extracted from variables.tf and we try to exclude very detailed explanations and links to other docs or variables from the description of the variables.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, it certainly makes sense to move it there, I will do that shortly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely forgot that we have FAQ where such details should be written. :)

@daroga0002

Copy link
Copy Markdown
Contributor

I have opened #1603 for same to fix it

@daroga0002

Copy link
Copy Markdown
Contributor

#1603 has been merged so this PR can be closed

@daroga0002 daroga0002 closed this Sep 28, 2021
@github-actions

Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs should clarify private endpoint need to be true when public endpoint is IP filtered

3 participants