Interface NodegroupOptions

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
NodegroupProps
All Known Implementing Classes:
NodegroupOptions.Jsii$Proxy, NodegroupProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-12-27T17:02:01.775Z") @Stability(Stable) public interface NodegroupOptions extends software.amazon.jsii.JsiiSerializable
The Nodegroup Options for addNodeGroup() method.

Example:

 Cluster cluster;
 cluster.addNodegroupCapacity("extra-ng-spot", NodegroupOptions.builder()
         .instanceTypes(List.of(
             new InstanceType("c5.large"),
             new InstanceType("c5a.large"),
             new InstanceType("c5d.large")))
         .minSize(3)
         .capacityType(CapacityType.SPOT)
         .build());
 
  • Method Details

    • getAmiType

      @Stability(Stable) @Nullable default NodegroupAmiType getAmiType()
      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.

      Default: - auto-determined from the instanceTypes property when launchTemplateSpec property is not specified

    • getCapacityType

      @Stability(Stable) @Nullable default CapacityType getCapacityType()
      The capacity type of the nodegroup.

      Default: - ON_DEMAND

    • getDesiredSize

      @Stability(Stable) @Nullable default Number getDesiredSize()
      The current number of worker nodes that the managed node group should maintain.

      If not specified, the nodewgroup will initially create minSize instances.

      Default: 2

    • getDiskSize

      @Stability(Stable) @Nullable default Number getDiskSize()
      The root device disk size (in GiB) for your node group instances.

      Default: 20

    • getForceUpdate

      @Stability(Stable) @Nullable default Boolean getForceUpdate()
      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.

      Default: true

    • getInstanceTypes

      @Stability(Stable) @Nullable default List<InstanceType> getInstanceTypes()
      The instance types to use for your node group.

      Default: t3.medium will be used according to the cloudformation document.

      See Also:
    • getLabels

      @Stability(Stable) @Nullable default Map<String,String> getLabels()
      The Kubernetes labels to be applied to the nodes in the node group when they are created.

      Default: - None

    • getLaunchTemplateSpec

      @Stability(Stable) @Nullable default LaunchTemplateSpec getLaunchTemplateSpec()
      Launch template specification used for the nodegroup.

      Default: - no launch template

      See Also:
    • getMaxSize

      @Stability(Stable) @Nullable default Number getMaxSize()
      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.

      Default: - desiredSize

    • getMaxUnavailable

      @Stability(Stable) @Nullable default Number getMaxUnavailable()
      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.

      Default: 1

      See Also:
    • getMaxUnavailablePercentage

      @Stability(Stable) @Nullable default Number getMaxUnavailablePercentage()
      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.

      Default: undefined - node groups will update instances one at a time

      See Also:
    • getMinSize

      @Stability(Stable) @Nullable default Number getMinSize()
      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.

      Default: 1

    • getNodegroupName

      @Stability(Stable) @Nullable default String getNodegroupName()
      Name of the Nodegroup.

      Default: - resource ID

    • getNodeRole

      @Stability(Stable) @Nullable default IRole getNodeRole()
      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.

      Default: - None. Auto-generated if not specified.

    • getReleaseVersion

      @Stability(Stable) @Nullable default String getReleaseVersion()
      The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example, 1.14.7-YYYYMMDD).

      Default: - The latest available AMI version for the node group's current Kubernetes version is used.

    • getRemoteAccess

      @Stability(Stable) @Nullable default NodegroupRemoteAccess getRemoteAccess()
      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)

      Default: - disabled

    • getSubnets

      @Stability(Stable) @Nullable default SubnetSelection getSubnets()
      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.

      Default: - private subnets

    • getTags

      @Stability(Stable) @Nullable default Map<String,String> getTags()
      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.

      Default: - None

    • getTaints

      @Stability(Stable) @Nullable default List<TaintSpec> getTaints()
      The Kubernetes taints to be applied to the nodes in the node group when they are created.

      Default: - None

    • builder

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