Interface CommonClusterOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ClusterOptions, ClusterProps, FargateClusterProps
All Known Implementing Classes:
ClusterOptions.Jsii$Proxy, ClusterProps.Jsii$Proxy, CommonClusterOptions.Jsii$Proxy, FargateClusterProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-11T23:26:33.175Z") @Stability(Stable) public interface CommonClusterOptions extends software.amazon.jsii.JsiiSerializable
Options for configuring an EKS cluster.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.ec2.*;
 import software.amazon.awscdk.services.eks.*;
 import software.amazon.awscdk.services.iam.*;
 KubernetesVersion kubernetesVersion;
 Role role;
 SecurityGroup securityGroup;
 Subnet subnet;
 SubnetFilter subnetFilter;
 Vpc vpc;
 CommonClusterOptions commonClusterOptions = CommonClusterOptions.builder()
         .version(kubernetesVersion)
         // the properties below are optional
         .clusterName("clusterName")
         .outputClusterName(false)
         .outputConfigCommand(false)
         .role(role)
         .securityGroup(securityGroup)
         .vpc(vpc)
         .vpcSubnets(List.of(SubnetSelection.builder()
                 .availabilityZones(List.of("availabilityZones"))
                 .onePerAz(false)
                 .subnetFilters(List.of(subnetFilter))
                 .subnetGroupName("subnetGroupName")
                 .subnets(List.of(subnet))
                 .subnetType(SubnetType.PRIVATE_ISOLATED)
                 .build()))
         .build();
 
  • Method Details

    • getVersion

      @Stability(Stable) @NotNull KubernetesVersion getVersion()
      The Kubernetes version to run in the cluster.
    • getClusterName

      @Stability(Stable) @Nullable default String getClusterName()
      Name for the cluster.

      Default: - Automatically generated name

    • getOutputClusterName

      @Stability(Stable) @Nullable default Boolean getOutputClusterName()
      Determines whether a CloudFormation output with the name of the cluster will be synthesized.

      Default: false

    • getOutputConfigCommand

      @Stability(Stable) @Nullable default Boolean getOutputConfigCommand()
      Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized.

      This command will include the cluster name and, if applicable, the ARN of the masters IAM role.

      Default: true

    • getRole

      @Stability(Stable) @Nullable default IRole getRole()
      Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

      Default: - A role is automatically created for you

    • getSecurityGroup

      @Stability(Stable) @Nullable default ISecurityGroup getSecurityGroup()
      Security Group to use for Control Plane ENIs.

      Default: - A security group is automatically created

    • getVpc

      @Stability(Stable) @Nullable default IVpc getVpc()
      The VPC in which to create the Cluster.

      Default: - a VPC with default configuration will be created and can be accessed through `cluster.vpc`.

    • getVpcSubnets

      @Stability(Stable) @Nullable default List<SubnetSelection> getVpcSubnets()
      Where to place EKS Control Plane ENIs.

      For example, to only select private subnets, supply the following:

      vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }]

      Default: - All public and private subnets

    • builder

      @Stability(Stable) static CommonClusterOptions.Builder builder()
      Returns:
      a CommonClusterOptions.Builder of CommonClusterOptions