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

eks: Make kubectl property required in EKS cluster #33261

Open
2 tasks done
xazhao opened this issue Jan 31, 2025 · 0 comments
Open
2 tasks done

eks: Make kubectl property required in EKS cluster #33261

xazhao opened this issue Jan 31, 2025 · 0 comments
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@xazhao
Copy link
Contributor

xazhao commented Jan 31, 2025

Describe the feature

Currently in EKS cluster construct, kubectlLayer is an optional property. If not specified, CDK will use a default layer of kubectl v20. This default version is outdated because earliest kubernete version EKS supports (extended support) now is 1.24. See https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html. It shouldn't use any default version actually.

And because of the default version, aws-cdk-lib has a dependency on "@aws-cdk/asset-kubectl-v20". It uses an old version of helm which is impacted by CVE-2024-24790.

Use Case

When I uses CDK, whether I use EKS Cluster construct or not, @aws-cdk/asset-kubectl-v20 will always be in my dependencies.

Proposed Solution

Make kubectlLayer property of EKS Cluster construct required from optional.

Yes it is a BREAKING CHANGE. People who uses EKS Cluster without providing kubectlLayer will see a synth error. But the default version is already very outdated and shouldn't be used anymore. And removing the dependency and not setting up default version is a better solution in the long term.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

v2.177.0

Environment details (OS name and version, etc.)

MacOs

@xazhao xazhao added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jan 31, 2025
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Jan 31, 2025
@xazhao xazhao added p2 and removed @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service labels Jan 31, 2025
@pahud pahud added p1 effort/medium Medium work item – several days of effort @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service and removed needs-triage This issue or PR still needs to be triaged. p2 labels Feb 1, 2025
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 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

No branches or pull requests

2 participants