Class NodegroupProps.Builder

java.lang.Object
software.amazon.awscdk.services.eks.NodegroupProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<NodegroupProps>
Enclosing interface:
NodegroupProps

@Stability(Stable) public static final class NodegroupProps.Builder extends Object implements software.amazon.jsii.Builder<NodegroupProps>
A builder for NodegroupProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • cluster

      @Stability(Stable) public NodegroupProps.Builder cluster(ICluster cluster)
      Sets the value of NodegroupProps.getCluster()
      Parameters:
      cluster - Cluster resource. This parameter is required.
      Returns:
      this
    • amiType

      @Stability(Stable) public NodegroupProps.Builder amiType(NodegroupAmiType amiType)
      Parameters:
      amiType - The AMI type for your node group. If you explicitly specify the launchTemplate with custom AMI, do not specify this property, or the node group deployment will fail. In other cases, you will need to specify correct amiType for the nodegroup.
      Returns:
      this
    • capacityType

      @Stability(Stable) public NodegroupProps.Builder capacityType(CapacityType capacityType)
      Parameters:
      capacityType - The capacity type of the nodegroup.
      Returns:
      this
    • desiredSize

      @Stability(Stable) public NodegroupProps.Builder desiredSize(Number desiredSize)
      Parameters:
      desiredSize - The current number of worker nodes that the managed node group should maintain. If not specified, the nodewgroup will initially create minSize instances.
      Returns:
      this
    • diskSize

      @Stability(Stable) public NodegroupProps.Builder diskSize(Number diskSize)
      Parameters:
      diskSize - The root device disk size (in GiB) for your node group instances.
      Returns:
      this
    • forceUpdate

      @Stability(Stable) public NodegroupProps.Builder forceUpdate(Boolean forceUpdate)
      Parameters:
      forceUpdate - Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. If an update fails because pods could not be drained, you can force the update after it fails to terminate the old node whether or not any pods are running on the node.
      Returns:
      this
    • instanceTypes

      @Stability(Stable) public NodegroupProps.Builder instanceTypes(List<? extends InstanceType> instanceTypes)
      Parameters:
      instanceTypes - The instance types to use for your node group.
      Returns:
      this
    • labels

      @Stability(Stable) public NodegroupProps.Builder labels(Map<String,String> labels)
      Parameters:
      labels - The Kubernetes labels to be applied to the nodes in the node group when they are created.
      Returns:
      this
    • launchTemplateSpec

      @Stability(Stable) public NodegroupProps.Builder launchTemplateSpec(LaunchTemplateSpec launchTemplateSpec)
      Parameters:
      launchTemplateSpec - Launch template specification used for the nodegroup.
      Returns:
      this
    • maxSize

      @Stability(Stable) public NodegroupProps.Builder maxSize(Number maxSize)
      Parameters:
      maxSize - The maximum number of worker nodes that the managed node group can scale out to. Managed node groups can support up to 100 nodes by default.
      Returns:
      this
    • maxUnavailable

      @Stability(Stable) public NodegroupProps.Builder maxUnavailable(Number maxUnavailable)
      Parameters:
      maxUnavailable - The maximum number of nodes unavailable at once during a version update. Nodes will be updated in parallel. The maximum number is 100.

      This value or maxUnavailablePercentage is required to have a value for custom update configurations to be applied.

      Returns:
      this
    • maxUnavailablePercentage

      @Stability(Stable) public NodegroupProps.Builder maxUnavailablePercentage(Number maxUnavailablePercentage)
      Parameters:
      maxUnavailablePercentage - The maximum percentage of nodes unavailable during a version update. This percentage of nodes will be updated in parallel, up to 100 nodes at once.

      This value or maxUnavailable is required to have a value for custom update configurations to be applied.

      Returns:
      this
    • minSize

      @Stability(Stable) public NodegroupProps.Builder minSize(Number minSize)
      Parameters:
      minSize - The minimum number of worker nodes that the managed node group can scale in to. This number must be greater than or equal to zero.
      Returns:
      this
    • nodegroupName

      @Stability(Stable) public NodegroupProps.Builder nodegroupName(String nodegroupName)
      Parameters:
      nodegroupName - Name of the Nodegroup.
      Returns:
      this
    • nodeRole

      @Stability(Stable) public NodegroupProps.Builder nodeRole(IRole nodeRole)
      Parameters:
      nodeRole - The IAM role to associate with your node group. The Amazon EKS worker node kubelet daemon makes calls to AWS APIs on your behalf. Worker nodes receive permissions for these API calls through an IAM instance profile and associated policies. Before you can launch worker nodes and register them into a cluster, you must create an IAM role for those worker nodes to use when they are launched.
      Returns:
      this
    • releaseVersion

      @Stability(Stable) public NodegroupProps.Builder releaseVersion(String releaseVersion)
      Parameters:
      releaseVersion - The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example, 1.14.7-YYYYMMDD).
      Returns:
      this
    • remoteAccess

      @Stability(Stable) public NodegroupProps.Builder remoteAccess(NodegroupRemoteAccess remoteAccess)
      Parameters:
      remoteAccess - The remote access (SSH) configuration to use with your node group. Disabled by default, however, if you specify an Amazon EC2 SSH key but do not specify a source security group when you create a managed node group, then port 22 on the worker nodes is opened to the internet (0.0.0.0/0)
      Returns:
      this
    • subnets

      @Stability(Stable) public NodegroupProps.Builder subnets(SubnetSelection subnets)
      Parameters:
      subnets - The subnets to use for the Auto Scaling group that is created for your node group. By specifying the SubnetSelection, the selected subnets will automatically apply required tags i.e. kubernetes.io/cluster/CLUSTER_NAME with a value of shared, where CLUSTER_NAME is replaced with the name of your cluster.
      Returns:
      this
    • tags

      @Stability(Stable) public NodegroupProps.Builder tags(Map<String,String> tags)
      Sets the value of NodegroupOptions.getTags()
      Parameters:
      tags - The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a key and an optional value, both of which you define. Node group tags do not propagate to any other resources associated with the node group, such as the Amazon EC2 instances or subnets.
      Returns:
      this
    • taints

      @Stability(Stable) public NodegroupProps.Builder taints(List<? extends TaintSpec> taints)
      Parameters:
      taints - The Kubernetes taints to be applied to the nodes in the node group when they are created.
      Returns:
      this
    • build

      @Stability(Stable) public NodegroupProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<NodegroupProps>
      Returns:
      a new instance of NodegroupProps
      Throws:
      NullPointerException - if any required attribute was not provided