Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws_eks: vpcSubnets description seems to be incorrect #27923

Closed
takawaha opened this issue Nov 10, 2023 · 1 comment · Fixed by #27931
Closed

aws_eks: vpcSubnets description seems to be incorrect #27923

takawaha opened this issue Nov 10, 2023 · 1 comment · Fixed by #27931
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.

Comments

@takawaha
Copy link

Describe the issue

The documentation for vpcSubnets says, If you want to create public load balancers, this must include public subnets..
However, we can create internet-facing ALB/NLB/CLB regardless of where the EKS Control Plane ENIs are located.

cloud-controller-manager and aws-load-balancer-controller can automatically detect public subnets by the tag kubernetes.io/role/elb.
https://repost.aws/knowledge-center/eks-vpc-subnet-discovery

Links

https://github.com/aws/aws-cdk/blob/v2.106.0/packages/aws-cdk-lib/aws-eks/lib/cluster.ts#L443
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.Cluster.html#vpcsubnets

@takawaha takawaha added documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged. labels Nov 10, 2023
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Nov 10, 2023
@mergify mergify bot closed this as completed in #27931 Nov 10, 2023
mergify bot pushed a commit that referenced this issue Nov 10, 2023
…ets (#27931)

It seems that the description for vpcSubnets in EKS Cluster class includes incorrect requirement.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.Cluster.html#vpcsubnets
> If you want to create public load balancers, this must include public subnets.

The requirements for subnets where control plane ENIs are placed are described in the following document.

https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html#network-requirements-subnets

> The subnets that you specify when you create or update a cluster must meet the following requirements:
> 
> The subnets must each have at least six IP addresses for use by Amazon EKS. However, we recommend at least 16 IP addresses.
> The subnets can't reside in AWS Outposts, AWS Wavelength, or an AWS Local Zone. However, if you have them in your VPC, you can deploy self-managed nodes and Kubernetes resources to these types of subnets.
> The subnets can be a public or private. However, we recommend that you specify private subnets, if possible. A public subnet is a subnet with a route table that includes a route to an internet gateway, whereas a private subnet is a subnet with a route table that doesn't include a route to an internet gateway.

Other components such as nodes, Kubernetes resources or ELB can be located in different subnets from the above subnets. This is also described in the above document as below.

> You can deploy nodes and Kubernetes resources to the same subnets that you specify when you create your cluster. However, this isn't necessary. This is because you can also deploy nodes and Kubernetes resources to subnets that you didn't specify when you created the cluster.

So, this PR simply removes the incorrect sentence from CDK doc.

Closes #27923

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

mikewrighton pushed a commit that referenced this issue Nov 13, 2023
…ets (#27931)

It seems that the description for vpcSubnets in EKS Cluster class includes incorrect requirement.

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.Cluster.html#vpcsubnets
> If you want to create public load balancers, this must include public subnets.

The requirements for subnets where control plane ENIs are placed are described in the following document.

https://docs.aws.amazon.com/eks/latest/userguide/network_reqs.html#network-requirements-subnets

> The subnets that you specify when you create or update a cluster must meet the following requirements:
> 
> The subnets must each have at least six IP addresses for use by Amazon EKS. However, we recommend at least 16 IP addresses.
> The subnets can't reside in AWS Outposts, AWS Wavelength, or an AWS Local Zone. However, if you have them in your VPC, you can deploy self-managed nodes and Kubernetes resources to these types of subnets.
> The subnets can be a public or private. However, we recommend that you specify private subnets, if possible. A public subnet is a subnet with a route table that includes a route to an internet gateway, whereas a private subnet is a subnet with a route table that doesn't include a route to an internet gateway.

Other components such as nodes, Kubernetes resources or ELB can be located in different subnets from the above subnets. This is also described in the above document as below.

> You can deploy nodes and Kubernetes resources to the same subnets that you specify when you create your cluster. However, this isn't necessary. This is because you can also deploy nodes and Kubernetes resources to subnets that you didn't specify when you created the cluster.

So, this PR simply removes the incorrect sentence from CDK doc.

Closes #27923

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service documentation This is a problem with documentation. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant