Class KubernetesVersion

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.eks_v2.KubernetesVersion
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-23T18:58:18.945Z") @Stability(Stable) public class KubernetesVersion extends software.amazon.jsii.JsiiObject
Kubernetes cluster version.

Example:

 Cluster cluster = Cluster.Builder.create(this, "ManagedNodeCluster")
         .version(KubernetesVersion.V1_34)
         .defaultCapacityType(DefaultCapacityType.NODEGROUP)
         .build();
 // Add a Fargate Profile for specific workloads (e.g., default namespace)
 cluster.addFargateProfile("FargateProfile", FargateProfileOptions.builder()
         .selectors(List.of(Selector.builder().namespace("default").build()))
         .build());
 

See Also:
  • Field Details

    • V1_25

      @Stability(Stable) public static final KubernetesVersion V1_25
      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.

    • V1_26

      @Stability(Stable) public static final KubernetesVersion V1_26
      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.

    • V1_27

      @Stability(Stable) public static final KubernetesVersion V1_27
      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.

    • V1_28

      @Stability(Stable) public static final KubernetesVersion V1_28
      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.

    • V1_29

      @Stability(Stable) public static final KubernetesVersion V1_29
      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.

    • V1_30

      @Stability(Stable) public static final KubernetesVersion V1_30
      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.

    • V1_31

      @Stability(Stable) public static final KubernetesVersion V1_31
      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.

    • V1_32

      @Stability(Stable) public static final KubernetesVersion V1_32
      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.

    • V1_33

      @Stability(Stable) public static final KubernetesVersion V1_33
      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.

    • V1_34

      @Stability(Stable) public static final KubernetesVersion V1_34
      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.

  • Constructor Details

    • KubernetesVersion

      protected KubernetesVersion(software.amazon.jsii.JsiiObjectRef objRef)
    • KubernetesVersion

      protected KubernetesVersion(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • of

      @Stability(Stable) @NotNull public static KubernetesVersion of(@NotNull String version)
      Custom cluster version.

      Parameters:
      version - custom version number. This parameter is required.
    • getVersion

      @Stability(Stable) @NotNull public String getVersion()
      cluster version number.