NodegroupOptions¶
-
class
aws_cdk.aws_eks.
NodegroupOptions
(*, ami_type=None, capacity_type=None, desired_size=None, disk_size=None, force_update=None, instance_type=None, instance_types=None, labels=None, launch_template_spec=None, max_size=None, min_size=None, nodegroup_name=None, node_role=None, release_version=None, remote_access=None, subnets=None, tags=None)¶ Bases:
object
The Nodegroup Options for addNodeGroup() method.
- Parameters
ami_type (
Optional
[NodegroupAmiType
]) – The AMI type for your node group. Default: - auto-determined from the instanceTypes property.capacity_type (
Optional
[CapacityType
]) – The capacity type of the nodegroup. Default: - ON_DEMANDdesired_size (
Union
[int
,float
,None
]) – The current number of worker nodes that the managed node group should maintain. If not specified, the nodewgroup will initially createminSize
instances. Default: 2disk_size (
Union
[int
,float
,None
]) – The root device disk size (in GiB) for your node group instances. Default: 20force_update (
Optional
[bool
]) – 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: trueinstance_type (
Optional
[InstanceType
]) – (deprecated) The instance type to use for your node group. Currently, you can specify a single instance type for a node group. The default value for this parameter ist3.medium
. If you choose a GPU instance type, be sure to specify theAL2_x86_64_GPU
with the amiType parameter. Default: t3.mediuminstance_types (
Optional
[List
[InstanceType
]]) – The instance types to use for your node group. Default: t3.medium will be used according to the cloudformation document.labels (
Optional
[Mapping
[str
,str
]]) – The Kubernetes labels to be applied to the nodes in the node group when they are created. Default: - Nonelaunch_template_spec (
Optional
[LaunchTemplateSpec
]) – Launch template specification used for the nodegroup. Default: - no launch templatemax_size (
Union
[int
,float
,None
]) – 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: - desiredSizemin_size (
Union
[int
,float
,None
]) – The minimum number of worker nodes that the managed node group can scale in to. This number must be greater than zero. Default: 1nodegroup_name (
Optional
[str
]) – Name of the Nodegroup. Default: - resource IDnode_role (
Optional
[IRole
]) – 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.release_version (
Optional
[str
]) – 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.remote_access (
Optional
[NodegroupRemoteAccess
]) – 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: - disabledsubnets (
Optional
[SubnetSelection
]) – 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 subnetstags (
Optional
[Mapping
[str
,str
]]) – 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
Attributes
-
ami_type
¶ The AMI type for your node group.
- Default
auto-determined from the instanceTypes property.
- Return type
Optional
[NodegroupAmiType
]
-
capacity_type
¶ The capacity type of the nodegroup.
- Default
ON_DEMAND
- Return type
Optional
[CapacityType
]
-
desired_size
¶ 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
- Return type
Union
[int
,float
,None
]
-
disk_size
¶ The root device disk size (in GiB) for your node group instances.
- Default
20
- Return type
Union
[int
,float
,None
]
-
force_update
¶ 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
- Return type
Optional
[bool
]
-
instance_type
¶ (deprecated) The instance type to use for your node group.
Currently, you can specify a single instance type for a node group. The default value for this parameter is
t3.medium
. If you choose a GPU instance type, be sure to specify theAL2_x86_64_GPU
with the amiType parameter.- Default
t3.medium
- Deprecated
Use
instanceTypes
instead.- Stability
deprecated
- Return type
Optional
[InstanceType
]
-
instance_types
¶ The instance types to use for your node group.
- Default
t3.medium will be used according to the cloudformation document.
- See
- Return type
Optional
[List
[InstanceType
]]
-
labels
¶ The Kubernetes labels to be applied to the nodes in the node group when they are created.
- Default
None
- Return type
Optional
[Mapping
[str
,str
]]
-
launch_template_spec
¶ Launch template specification used for the nodegroup.
- Default
no launch template
- See
- Return type
Optional
[LaunchTemplateSpec
]
-
max_size
¶ 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
- Return type
Union
[int
,float
,None
]
-
min_size
¶ The minimum number of worker nodes that the managed node group can scale in to.
This number must be greater than zero.
- Default
1
- Return type
Union
[int
,float
,None
]
-
node_role
¶ 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.
- Return type
Optional
[IRole
]
-
nodegroup_name
¶ Name of the Nodegroup.
- Default
resource ID
- Return type
Optional
[str
]
-
release_version
¶ 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.
- Return type
Optional
[str
]
-
remote_access
¶ 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
- Return type
Optional
[NodegroupRemoteAccess
]
-
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
- Return type
Optional
[SubnetSelection
]
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
- Return type
Optional
[Mapping
[str
,str
]]