incompatible kubernetes

0

I am trying to create an eks cluster with cdk. But the latest version of kubernetes is not able to run in my code. I am using the latest version of cdk. 2.96.2. I am trying to use version 1_27 but I am getting this error

File "/home/ec2-user/eks/cluster/app.py", line 11, in <module> ClusterStack(app, "ClusterStack", File "/home/ec2-user/.local/lib/python3.9/site-packages/jsii/_runtime.py", lin e 118, in call inst = super(JSIIMeta, cast(JSIIMeta, cls)).call(*args, **kwargs) File "/home/ec2-user/eks/cluster/cluster/cluster_stack.py", line 32, in __init __ version=eks.KubernetesVersion.V1_27, AttributeError: type object 'KubernetesVersion' has no attribute 'V1_27'

asked 7 months ago274 views
1 Answer
0

Hello,

When creating a Cluster with this version, you need to also specify the kubectlLayer property with a KubectlV27Layer from @aws-cdk/lambda-layer-kubectl-v27.

Please see here https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_eks.KubernetesVersion.html

profile pictureAWS
ladybug
answered 7 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions