Skip to content
v2.275.0

KubernetesVersion Class ​

Kubernetes cluster version.

Example ​

ts
const cluster = new eks.Cluster(this, 'ManagedNodeCluster', {
  version: eks.KubernetesVersion.V1_36,
  defaultCapacityType: eks.DefaultCapacityType.NODEGROUP,
});

// Add a Fargate Profile for specific workloads (e.g., default namespace)
cluster.addFargateProfile('FargateProfile', {
  selectors: [
    { namespace: 'default' }, // Run pods in 'default' on Fargate
],
});

Properties ​

Kubernetes version 1.25.

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

Kubernetes version 1.26.

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

Kubernetes version 1.27.

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.

Kubernetes version 1.28.

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

Kubernetes version 1.29.

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

Kubernetes version 1.30.

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

Kubernetes version 1.31.

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

Kubernetes version 1.32.

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

Kubernetes version 1.33.

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

Kubernetes version 1.34.

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

Kubernetes version 1.35.

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

Kubernetes version 1.36.

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

versionstringversionstrversionStringVersionstringVersion*string#
cluster version number.

Methods ​

of(version: string): KubernetesVersion // chainable@staticmethod def of(version: str) -> KubernetesVersionpublic static KubernetesVersion of(String version)public static KubernetesVersion Of(string version)func Of(Version *string) KubernetesVersionstatic#
Custom cluster version.
1 parameter

Parameters

  • versionversionversionversionVersion — custom version number.