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): Add support for EKS 1.31 clusters #31695

Closed
2 tasks
JoeNorth opened this issue Oct 8, 2024 · 4 comments · Fixed by #31707
Closed
2 tasks

(eks): Add support for EKS 1.31 clusters #31695

JoeNorth opened this issue Oct 8, 2024 · 4 comments · Fixed by #31707
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. p2

Comments

@JoeNorth
Copy link

JoeNorth commented Oct 8, 2024

Describe the feature

Add support for creating EKS 1.31 clusters. The Amazon EKS Construct Library and the lambda-layer-kubectl currently only support up to version 1.30.

Existing issue open for the lambda-layer-kubectl repo: cdklabs/awscdk-asset-kubectl#1172

Use Case

Customers are unable to create 1.31 clusters as the latest defined version in the construct library is 1.30.

See https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-eks/lib/cluster.ts#L992

Proposed Solution

Update the construct library to add a V1_31 KubernetesVersion.

Other Information

No response

Acknowledgements

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

CDK version used

2.161.1

Environment details (OS name and version, etc.)

Any

@JoeNorth JoeNorth added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 8, 2024
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Oct 8, 2024
@pahud
Copy link
Contributor

pahud commented Oct 8, 2024

depend on cdklabs/awscdk-asset-kubectl#1173

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 8, 2024
@pahud
Copy link
Contributor

pahud commented Oct 8, 2024

pending review cdklabs/awscdk-asset-kubectl#1190

@pahud
Copy link
Contributor

pahud commented Oct 8, 2024

Hi

Given cdklabs/awscdk-asset-kubectl#1190 is merged, we welcome community PRs for aws-eks to add the 1.31 clusters support. Check #30454 for your reference.

@mergify mergify bot closed this as completed in #31707 Oct 9, 2024
mergify bot pushed a commit that referenced this issue Oct 9, 2024
### Issue # (if applicable)

Closes #31695

### Reason for this change

- Similar to #30454, this PR adds 1.31 support.
- Update all existing integ tests for V1_30 and make sure they deploy with V1_31.


### Description of changes



### Description of how you validated changes


```ts
import * as ec2 from 'aws-cdk-lib/aws-ec2';
import * as iam from 'aws-cdk-lib/aws-iam';
import { App, Stack, StackProps } from 'aws-cdk-lib';
import { KubectlV31Layer } from '@aws-cdk/lambda-layer-kubectl-v31';
import * as eks from 'aws-cdk-lib/aws-eks';
import { Construct } from 'constructs';

export class EksClusterLatestVersion extends Stack {
  constructor(scope: Construct, id: string, props: StackProps) {
    super(scope, id, props);

    const vpc = new ec2.Vpc(this, 'Vpc', { natGateways: 1 });
    const mastersRole = new iam.Role(this, 'Role', {
      assumedBy: new iam.AccountRootPrincipal(),
    });

    new eks.Cluster(this, 'Cluster', {
      vpc,
      mastersRole,
      version: eks.KubernetesVersion.V1_31,
      kubectlLayer: new KubectlV31Layer(this, 'KubectlLayer'),
      defaultCapacity: 1,
    });
  }
}

const app = new App();
new EksClusterLatestVersion(app, 'v31-stack', {
  env: {
    account: process.env.CDK_DEFAULT_ACCOUNT,
    region: process.env.CDK_DEFAULT_REGION,
  },
})
```

verify

```sh
$ kubectl get no
NAME                           STATUS   ROLES    AGE     VERSION
ip-10-0-183-173.ec2.internal   Ready    <none>   4m25s   v1.31.0-eks-a737599
```

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

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

github-actions bot commented Oct 9, 2024

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants