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): support latest EKS engine version v1.22 #20263

Closed
mburket opened this issue May 9, 2022 · 52 comments · Fixed by #22604
Closed

(eks): support latest EKS engine version v1.22 #20263

mburket opened this issue May 9, 2022 · 52 comments · Fixed by #22604
Assignees
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1

Comments

@mburket
Copy link

mburket commented May 9, 2022

Describe the bug

We just updated the CDK version from 2.20 to 2.23 and we are using the latest EKS 1.22 version. Looks like the EKS 1.22 is removed from 2.22+.

Error from npm build: "error TS2551: Property 'V1_22' does not exist on type 'typeof KubernetesVersion'. Did you mean 'V1_20'?"

Expected Behavior

EKS v1.22 should not be removed.

Current Behavior

EKS v1.22 is not supported.

Reproduction Steps

Specify Kubernete version of V1_22 when create an EKS cluster using CDK 2.22+.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.23

Framework Version

No response

Node.js Version

14

OS

Mac

Language

Typescript

Language Version

No response

Other information

No response

@mburket mburket added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels May 9, 2022
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label May 9, 2022
@robertd
Copy link
Contributor

robertd commented May 10, 2022

@mburket See #20000 for why v1.22 was reverted.

@kaizencc
Copy link
Contributor

Echoing what @robertd mentioned above. We're working on reducing the module size to allow multiple versions of kubectl lambda layers, but at this time, we can't support v1.22.

@github-actions
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.

@sdenardi
Copy link

sdenardi commented Jul 1, 2022

Hi @robertd and @kaizencc. Now that v1.21 is EOL, is there any progress or timeline update on bringing v1.22 support to the cdk?

The question came up on my team because one of the apps we use dropped support for v1.21 in a recent release. We prefer and enjoy using the cdk to manage our resources, so are hesitant to perform an update to v1.22 through the AWS Console and have our cdk code out of sync with the cluster.

We completely get the reasons for reverting support, and appreciate yall's transparency and consideration for users. Thank you for all you do.

@kaizencc
Copy link
Contributor

kaizencc commented Jul 8, 2022

@sdenardi We are actively working on this via the Reduce Module Size RFC. In particular, @madeline-k is working on the lambda layer aspect of the RFC that will unlock the ability to create new layers (without massively increasing package size). I don't want to commit to a timeline atm, but this is in development and hopefully we can share further updates with y'all as they arise.

@kaizencc kaizencc added blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. feature-request A feature should be added or improved. effort/small Small work item – less than a day of effort p1 and removed needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Jul 8, 2022
@kaizencc kaizencc assigned kaizencc and madeline-k and unassigned otaviomacedo Jul 8, 2022
@kaizencc kaizencc changed the title EKS: Latest EKS engine version v1.22 is removed after CDK 2.22 (eks): support latest EKS engine version v1.22 Jul 8, 2022
@kaizencc kaizencc reopened this Jul 8, 2022
@robertd
Copy link
Contributor

robertd commented Jul 8, 2022

Hey @sdenardi, @pahud and I are brainstorming on PR draft (#20596) and how to create custom kubectl layer that will match EKS cluster version instead.

@robertd
Copy link
Contributor

robertd commented Jul 8, 2022

@kaizencc Are we doing the same thing in #20596, that @madeline-k is currently investigating?

@AnitaErnszt
Copy link

@kaizencc that RFC you mentioned seems abandoned, the last comment on it was over 3 weeks ago.

I would absolutely love to put EKS forward as the IaC tool for our EKS setup (we currently using terraform for most things..), but the fact that CDK only supports the end-of-time V1.21 makes it impossible.
AWS is due to release V1.23 this month, is it safe to presume we not gonna get this version in CDK anytime soon either?

Reading the comment on the roll-back, it seems like your issue is to support <= V.1.20 whilst supporting the new version. V1.18 && V1.19 are now officially deprecated and V.20 is due to be deprecated in November.
Are you planning to wait until November to resolve this issue?

@shcherbak
Copy link

shcherbak commented Aug 12, 2022

@kaizencc AWS EKS 1.23 is available, but we can not upgrade even 1.21 using CDK :(

@shcherbak
Copy link

starting migration to terraform next monday
sick and tired of this problem

@sdenardi
Copy link

I'm not quite ready to abandon CDK, as it fits nicely with our other tooling and have served our needs well up to this point.

It is a bit frustrating to not get any updates, while at the same time getting emails from AWS with the subject line:

Install EBS CSI driver before upgrading to EKS version 1.23

@watany-dev
Copy link
Contributor

I have a problem that I can't version up eks for cdk, but here is my understanding

Therefore, we believe we can adopt at least v1.22 by taking the following actions.

  1. upgrade lambda-layer-kubectl to v1.21
  2. deprecate aws-eks up to v1.19. Newly support v1.22.

Frankly, I don't think it is appropriate to prevent the deployment of eks clusters for the sake of downward compatibility with lambda-layer-kubectl, so either add the ability to specify the version of lambda-layer-kubectl or truncate support for the oldest version. EKS is a version or two behind k8s, and we believe that there are many users who would like to increase their EKS version as much as possible.

@WinterYukky
Copy link
Contributor

I agree with @watany-dev's #20263 (comment) .
I know that I am currently blocking PR regarding the lambda layer. (because they are working on package size improvements for the lambda layer). I know that comment is a breaking and exceptional change, but I still think it is well worth it.

If we make this change, there will be a grace period before the next support expires. If RFC is merged in the meantime, it would be possible to support multiple versions of lambda-layer.

@gkaskonas
Copy link
Contributor

Any ETA on this? AWS is already pushing v1.23 and we can't upgrade

@nilroy
Copy link

nilroy commented Sep 30, 2022

@cgarvis Do you know if you are able to release this next week?

@David-Tamrazov
Copy link

@cgarvis @kaizencc hey team, are there any updates for when this fix will land?

@shcherbak
Copy link

shcherbak commented Oct 6, 2022

mid September -> mid November ? @cgarvis @kaizencc

@nilroy
Copy link

nilroy commented Oct 6, 2022

@cgarvis @kaizencc this issue is really biting us. Please set some ETA so that we can plan accordingly. Right now everything seems to be in air.

@jtnz
Copy link

jtnz commented Oct 11, 2022

We were just affected by an issue with cluster autoscaler that doesn't appear to be backported to old 1.21. Feeling like second class citizens because we chose to do IaC/best practices using CDK.

@vumdao
Copy link

vumdao commented Oct 11, 2022

@cgarvis how many end of the week should we keep waiting for?

@misterjacko
Copy link
Contributor

I have advocated for the adoption of CDK over Terraform for new projects in my company and our new EKS stacks were our trial run. I am finally ready to admit defeat and swallow the sunk cost and begin the work importing the stack into Terraform.

We are ~4 months away from end of support for EKS 1.21 and unable to update. This unacceptable level of support for EKS from the CDK is a risk I can't recommend my company continue to accept.

@nilroy
Copy link

nilroy commented Oct 11, 2022

@cgarvis @kaizencc What kind of support is this? If you guys are not gonna fix it in reasonable time then just share it.. Why keep us waiting for something that has no guarantee of arrival?

@watany-dev
Copy link
Contributor

watany-dev commented Oct 11, 2022

Even if the development of EKS Blueprints is substantial, it is difficult to recommend to other engineers an IaC tool that cannot update the EKS cluster satisfactorily.
For engineers using EKS, this unresolved issue has a bigger impact than the backward compatibility of lambda-layer-kubectl.
I don't want to throw away the CDK

@nilroy
Copy link

nilroy commented Oct 11, 2022

We had put substantial effort on building the IaC using cdk and I would not like to ditch everything for a stupid issue. I started to feel that this issue will not be solved in anytime soon. Probably we have to build our own lambda layers ourselves

@softmates
Copy link

we don't want to go through this again.please skip 1.22 and support v1.23 directly.

@Obirah
Copy link

Obirah commented Oct 12, 2022

we don't want to go through this again.please skip 1.22 and support v1.23 directly.

If (I know, I know - this is a big if though) they solve it correctly, any version will be supported immediately, because they'll have automation to create separate lambda layers for each k8s version and the CDK constructs will automatically use the correct layer depending on which k8s version is passed.

We adopted this approach several months ago and had no problems to update to 1.22 and later 1.23 with the CDK.

@cgarvis
Copy link
Contributor

cgarvis commented Oct 18, 2022

Hi all, we have hit some snags in our implementation that would require breaking changes for non JS users. We met internal yesterday to discuss our options. We have decided to backing out of our current implementation and have come up with fix that we think we can get done this week. We will know on Friday if this will get in for next week's release. The approach should solve this issue once and for all so we won't have to go through this again.

We did discuss with the EKS team, and it seems that you should be able to upgrade your EKS cluster while still using the 1.20 kubectl lambda layer. If you are worried about timelines, I would suggestion trying to upgrade.

@johnnyhuy
Copy link

johnnyhuy commented Oct 18, 2022

We instead ended up using the L1 CDK Construct CfnCluster to provision our EKS cluster to support later versions.

We then handled AWS auth mapping and other bootstrapping processes later in the process via Helm or Kubectl once logged into the cluster.

The only snag we encountered was EKS cluster bootstrap assigning kubernetes-master to the CDK exec role - #16888 👀

Workaround there was to use the CliCredentialsStackSynthesizer.

@pahud
Copy link
Contributor

pahud commented Oct 21, 2022

@johnnyhuy do you have slack ID on cdk.dev? Would love to discuss more details with you offline. Thanks.

@PavanMudigondaTR
Copy link

Have been struggling with this error for the last two days! Just today noticed this issue log. I would appreciate if AWS can provide solution. for mean time i will destroy my 1.23 stack and deploy with 1.21. I hope that works !

@jeffb4
Copy link
Contributor

jeffb4 commented Oct 24, 2022

@cgarvis is it going to make it in this week's release?

@nilroy
Copy link

nilroy commented Oct 24, 2022

@cgarvis I tried upgrading the eks version with the current kubectl lambda layer. I succeeded upgrading the cluster from 1.21 to 1.22 and then to 1.23. But once I try adding a new Fargate profile I encounter the same issue as in here. So its still not a full solution.

I ended up building our own lambda layer following the instruction provided by @Obirah and that works. I hope you guys land the proper fix soon.

@NinoSkopac
Copy link

@cgarvis is it going to make it in this week's release?

Of course not

@mergify mergify bot closed this as completed in #22604 Oct 25, 2022
mergify bot pushed a commit that referenced this issue Oct 25, 2022
Add support for Kubernetes Version 1.22. In order to use this version, customers must pass in a `KubectlLayer` object from `@aws-cdk/lambda-layer-kubectl-v22` to the `kubectlLayer` construct prop of `Cluster`. 

Notes:
- Updating integration tests are still in progress

Closes #20263 

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [x] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [x] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
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.

@cgarvis
Copy link
Contributor

cgarvis commented Oct 26, 2022

So we got 1.22 merged into main. We are holding the release this week until we can get 1.23 (#22638). If things go well, you should see a new version out tomorrow.

@David-Tamrazov
Copy link

Thank you for the hard work and quick pivot after the blocker came up @cgarvis @madeline-k @kaizencc ! Really appreciate it 🙏

@nilroy
Copy link

nilroy commented Oct 27, 2022

Thank you @cgarvis @madeline-k @kaizencc for this! It is a much needed feature.

@kaizencc
Copy link
Contributor

So Kubernetes 1.22 support is released in 2.48.0, which is out now.
Kubernetes 1.23 support is a part of 2.49.0, which if all goes well is out tonight.

Cheers!

@David-Tamrazov
Copy link

@kaizencc do you know what the plan will be for 1.24 and 1.25? will it be supported with similar patches or is there a different solution in progress?

@kaizencc
Copy link
Contributor

1.24 isn't scheduled to be released until November 2022: https://docs.aws.amazon.com/eks/latest/userguide/kubernetes-versions.html#kubernetes-release-calendar

At that time, we'll create a new lambda layer, @aws-cdk/asset-kubectl-v24, which you will be able to send in as a kubectlLayer (we actually already have this for 1.24: https://github.com/cdklabs/awscdk-asset-kubectl).

We'll also add a static method in the eks module for ease-of-use, and run the integ tests to update the snapshots. This isn't a blocker however; you can always specify your kubectl version with eks.KubernetesVersion.of('1.24'), and then send in the corresponding lambda layer via the kubectlLayer prop.

All this is to say, this is our permanent solution, and there isn't anything to block you on the CDK side. The blocker here is that Amazon EKS support isn't expected until November.

@David-Tamrazov
Copy link

Great! Thanks for clarifying.

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 blocked Work is blocked on this issue for this codebase. Other labels or comments may indicate why. effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.