Class Nodegroup.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<Nodegroup>
- Enclosing class:
Nodegroup
Nodegroup
.-
Method Summary
Modifier and TypeMethodDescriptionamiType
(NodegroupAmiType amiType) The AMI type for your node group.build()
capacityType
(CapacityType capacityType) The capacity type of the nodegroup.Cluster resource.static Nodegroup.Builder
desiredSize
(Number desiredSize) The current number of worker nodes that the managed node group should maintain.The root device disk size (in GiB) for your node group instances.forceUpdate
(Boolean forceUpdate) Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.instanceTypes
(List<? extends InstanceType> instanceTypes) The instance types to use for your node group.The Kubernetes labels to be applied to the nodes in the node group when they are created.launchTemplateSpec
(LaunchTemplateSpec launchTemplateSpec) Launch template specification used for the nodegroup.The maximum number of worker nodes that the managed node group can scale out to.maxUnavailable
(Number maxUnavailable) The maximum number of nodes unavailable at once during a version update.maxUnavailablePercentage
(Number maxUnavailablePercentage) The maximum percentage of nodes unavailable during a version update.The minimum number of worker nodes that the managed node group can scale in to.nodegroupName
(String nodegroupName) Name of the Nodegroup.The IAM role to associate with your node group.releaseVersion
(String releaseVersion) The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example,1.14.7-YYYYMMDD
).remoteAccess
(NodegroupRemoteAccess remoteAccess) The remote access (SSH) configuration to use with your node group.subnets
(SubnetSelection subnets) The subnets to use for the Auto Scaling group that is created for your node group.The metadata to apply to the node group to assist with categorization and organization.The Kubernetes taints to be applied to the nodes in the node group when they are created.
-
Method Details
-
create
@Stability(Stable) public static Nodegroup.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
Nodegroup.Builder
.
-
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.
Default: - auto-determined from the instanceTypes property when launchTemplateSpec property is not specified
- Parameters:
amiType
- The AMI type for your node group. This parameter is required.- Returns:
this
-
capacityType
The capacity type of the nodegroup.Default: - ON_DEMAND
- Parameters:
capacityType
- The capacity type of the nodegroup. This parameter is required.- Returns:
this
-
desiredSize
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
- Parameters:
desiredSize
- The current number of worker nodes that the managed node group should maintain. This parameter is required.- Returns:
this
-
diskSize
The root device disk size (in GiB) for your node group instances.Default: 20
- Parameters:
diskSize
- The root device disk size (in GiB) for your node group instances. This parameter is required.- Returns:
this
-
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.
Default: true
- Parameters:
forceUpdate
- Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue. This parameter is required.- Returns:
this
-
instanceTypes
@Stability(Stable) public Nodegroup.Builder instanceTypes(List<? extends InstanceType> instanceTypes) The instance types to use for your node group.Default: t3.medium will be used according to the cloudformation document.
- Parameters:
instanceTypes
- The instance types to use for your node group. This parameter is required.- Returns:
this
- See Also:
-
labels
The Kubernetes labels to be applied to the nodes in the node group when they are created.Default: - None
- Parameters:
labels
- The Kubernetes labels to be applied to the nodes in the node group when they are created. This parameter is required.- Returns:
this
-
launchTemplateSpec
@Stability(Stable) public Nodegroup.Builder launchTemplateSpec(LaunchTemplateSpec launchTemplateSpec) Launch template specification used for the nodegroup.Default: - no launch template
- Parameters:
launchTemplateSpec
- Launch template specification used for the nodegroup. This parameter is required.- Returns:
this
- See Also:
-
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.
Default: - desiredSize
- Parameters:
maxSize
- The maximum number of worker nodes that the managed node group can scale out to. This parameter is required.- Returns:
this
-
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.
Default: 1
- Parameters:
minSize
- The minimum number of worker nodes that the managed node group can scale in to. This parameter is required.- Returns:
this
-
nodegroupName
Name of the Nodegroup.Default: - resource ID
- Parameters:
nodegroupName
- Name of the Nodegroup. This parameter is required.- Returns:
this
-
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.
Default: - None. Auto-generated if not specified.
- Parameters:
nodeRole
- The IAM role to associate with your node group. This parameter is required.- Returns:
this
-
releaseVersion
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.
- Parameters:
releaseVersion
- The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example,1.14.7-YYYYMMDD
). This parameter is required.- Returns:
this
-
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)
Default: - disabled
- Parameters:
remoteAccess
- The remote access (SSH) configuration to use with your node group. This parameter is required.- Returns:
this
-
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 ofshared
, whereCLUSTER_NAME
is replaced with the name of your cluster.Default: - private subnets
- Parameters:
subnets
- The subnets to use for the Auto Scaling group that is created for your node group. This parameter is required.- Returns:
this
-
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.
Default: - None
- Parameters:
tags
- The metadata to apply to the node group to assist with categorization and organization. This parameter is required.- Returns:
this
-
taints
The Kubernetes taints to be applied to the nodes in the node group when they are created.Default: - None
- Parameters:
taints
- The Kubernetes taints to be applied to the nodes in the node group when they are created. This parameter is required.- Returns:
this
-
cluster
Cluster resource.- Parameters:
cluster
- Cluster resource. This parameter is required.- Returns:
this
-
build
-