Class Cluster.Builder

java.lang.Object
software.amazon.awscdk.services.eks.legacy.Cluster.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<Cluster>
Enclosing class:
Cluster

@Stability(Deprecated) @Deprecated public static final class Cluster.Builder extends Object implements software.amazon.jsii.Builder<Cluster>
Deprecated.
(deprecated) A fluent builder for Cluster.
  • Method Details

    • create

      @Stability(Deprecated) @Deprecated public static Cluster.Builder create(Construct scope, String id)
      Deprecated.
      Parameters:
      scope - a Construct, most likely a cdk.Stack created. This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Cluster.Builder.
    • clusterName

      @Stability(Deprecated) @Deprecated public Cluster.Builder clusterName(String clusterName)
      Deprecated.
      (deprecated) Name for the cluster.

      Default: - Automatically generated name

      Parameters:
      clusterName - Name for the cluster. This parameter is required.
      Returns:
      this
    • defaultCapacity

      @Stability(Deprecated) @Deprecated public Cluster.Builder defaultCapacity(Number defaultCapacity)
      Deprecated.
      (deprecated) Number of instances to allocate as an initial capacity for this cluster.

      Instance type can be configured through defaultCapacityInstanceType, which defaults to m5.large.

      Use cluster.addCapacity to add additional customized capacity. Set this to 0 is you wish to avoid the initial capacity allocation.

      Default: 2

      Parameters:
      defaultCapacity - Number of instances to allocate as an initial capacity for this cluster. This parameter is required.
      Returns:
      this
    • defaultCapacityInstance

      @Stability(Deprecated) @Deprecated public Cluster.Builder defaultCapacityInstance(InstanceType defaultCapacityInstance)
      Deprecated.
      (deprecated) The instance type to use for the default capacity.

      This will only be taken into account if defaultCapacity is > 0.

      Default: m5.large

      Parameters:
      defaultCapacityInstance - The instance type to use for the default capacity. This parameter is required.
      Returns:
      this
    • kubectlEnabled

      @Stability(Deprecated) @Deprecated public Cluster.Builder kubectlEnabled(Boolean kubectlEnabled)
      Deprecated.
      (deprecated) Allows defining kubectrl-related resources on this cluster.

      If this is disabled, it will not be possible to use the following capabilities:

      • addResource
      • addRoleMapping
      • addUserMapping
      • addMastersRole and props.mastersRole

      If this is disabled, the cluster can only be managed by issuing kubectl commands from a session that uses the IAM role/user that created the account.

      NOTE: changing this value will destoy the cluster. This is because a managable cluster must be created using an AWS CloudFormation custom resource which executes with an IAM role owned by the CDK app.

      Default: true The cluster can be managed by the AWS CDK application.

      Parameters:
      kubectlEnabled - Allows defining kubectrl-related resources on this cluster. This parameter is required.
      Returns:
      this
    • mastersRole

      @Stability(Deprecated) @Deprecated public Cluster.Builder mastersRole(IRole mastersRole)
      Deprecated.
      (deprecated) An IAM role that will be added to the system:masters Kubernetes RBAC group.

      Default: - By default, it will only possible to update this Kubernetes system by adding resources to this cluster via `addResource` or by defining `KubernetesResource` resources in your AWS CDK app. Use this if you wish to grant cluster administration privileges to another role.

      Parameters:
      mastersRole - An IAM role that will be added to the system:masters Kubernetes RBAC group. This parameter is required.
      Returns:
      this
      See Also:
    • outputClusterName

      @Stability(Deprecated) @Deprecated public Cluster.Builder outputClusterName(Boolean outputClusterName)
      Deprecated.
      (deprecated) Determines whether a CloudFormation output with the name of the cluster will be synthesized.

      Default: false

      Parameters:
      outputClusterName - Determines whether a CloudFormation output with the name of the cluster will be synthesized. This parameter is required.
      Returns:
      this
    • outputConfigCommand

      @Stability(Deprecated) @Deprecated public Cluster.Builder outputConfigCommand(Boolean outputConfigCommand)
      Deprecated.
      (deprecated) 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

      Parameters:
      outputConfigCommand - Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized. This parameter is required.
      Returns:
      this
    • outputMastersRoleArn

      @Stability(Deprecated) @Deprecated public Cluster.Builder outputMastersRoleArn(Boolean outputMastersRoleArn)
      Deprecated.
      (deprecated) Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified).

      Default: false

      Parameters:
      outputMastersRoleArn - Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified). This parameter is required.
      Returns:
      this
    • role

      @Stability(Deprecated) @Deprecated public Cluster.Builder role(IRole role)
      Deprecated.
      (deprecated) 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

      Parameters:
      role - Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf. This parameter is required.
      Returns:
      this
    • securityGroup

      @Stability(Deprecated) @Deprecated public Cluster.Builder securityGroup(ISecurityGroup securityGroup)
      Deprecated.
      (deprecated) Security Group to use for Control Plane ENIs.

      Default: - A security group is automatically created

      Parameters:
      securityGroup - Security Group to use for Control Plane ENIs. This parameter is required.
      Returns:
      this
    • version

      @Stability(Deprecated) @Deprecated public Cluster.Builder version(String version)
      Deprecated.
      (deprecated) The Kubernetes version to run in the cluster.

      Default: - If not supplied, will use Amazon default version

      Parameters:
      version - The Kubernetes version to run in the cluster. This parameter is required.
      Returns:
      this
    • vpc

      @Stability(Deprecated) @Deprecated public Cluster.Builder vpc(IVpc vpc)
      Deprecated.
      (deprecated) The VPC in which to create the Cluster.

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

      Parameters:
      vpc - The VPC in which to create the Cluster. This parameter is required.
      Returns:
      this
    • vpcSubnets

      @Stability(Deprecated) @Deprecated public Cluster.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
      Deprecated.
      (deprecated) Where to place EKS Control Plane ENIs.

      If you want to create public load balancers, this must include public subnets.

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

       Map<String, SubnetType>[] vpcSubnets = List.of(Map.of("subnetType", SubnetType.PRIVATE_WITH_NAT));
       

      Default: - All public and private subnets

      Parameters:
      vpcSubnets - Where to place EKS Control Plane ENIs. This parameter is required.
      Returns:
      this
    • build

      @Stability(Deprecated) @Deprecated public Cluster build()
      Deprecated.
      Specified by:
      build in interface software.amazon.jsii.Builder<Cluster>
      Returns:
      a newly built instance of Cluster.