Show / Hide Table of Contents

Class NodegroupOptions

The Nodegroup Options for addNodeGroup() method.

Inheritance
object
NodegroupOptions
Implements
INodegroupOptions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NodegroupOptions : INodegroupOptions
Syntax (vb)
Public Class NodegroupOptions Implements INodegroupOptions
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;

            cluster.AddNodegroupCapacity("extra-ng-spot", new NodegroupOptions {
                InstanceTypes = new [] {
                    new InstanceType("c5.large"),
                    new InstanceType("c5a.large"),
                    new InstanceType("c5d.large") },
                MinSize = 3,
                CapacityType = CapacityType.SPOT
            });

Synopsis

Constructors

NodegroupOptions()

The Nodegroup Options for addNodeGroup() method.

Properties

AmiType

The AMI type for your node group.

CapacityType

The capacity type of the nodegroup.

DesiredSize

The current number of worker nodes that the managed node group should maintain.

DiskSize

The root device disk size (in GiB) for your node group instances.

EnableNodeAutoRepair

Specifies whether to enable node auto repair for the node group.

ForceUpdate

Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.

InstanceTypes

The instance types to use for your node group.

Labels

The Kubernetes labels to be applied to the nodes in the node group when they are created.

LaunchTemplateSpec

Launch template specification used for the nodegroup.

MaxSize

The maximum number of worker nodes that the managed node group can scale out to.

MaxUnavailable

The maximum number of nodes unavailable at once during a version update.

MaxUnavailablePercentage

The maximum percentage of nodes unavailable during a version update.

MinSize

The minimum number of worker nodes that the managed node group can scale in to.

NodeRole

The IAM role to associate with your node group.

NodegroupName

Name of the Nodegroup.

ReleaseVersion

The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example, 1.14.7-YYYYMMDD).

RemoteAccess

The remote access (SSH) configuration to use with your node group.

Subnets

The subnets to use for the Auto Scaling group that is created for your node group.

Tags

The metadata to apply to the node group to assist with categorization and organization.

Taints

The Kubernetes taints to be applied to the nodes in the node group when they are created.

Constructors

NodegroupOptions()

The Nodegroup Options for addNodeGroup() method.

public NodegroupOptions()
Remarks

ExampleMetadata: infused

Examples
Cluster cluster;

            cluster.AddNodegroupCapacity("extra-ng-spot", new NodegroupOptions {
                InstanceTypes = new [] {
                    new InstanceType("c5.large"),
                    new InstanceType("c5a.large"),
                    new InstanceType("c5d.large") },
                MinSize = 3,
                CapacityType = CapacityType.SPOT
            });

Properties

AmiType

The AMI type for your node group.

public NodegroupAmiType? AmiType { get; set; }
Property Value

NodegroupAmiType?

Remarks

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

CapacityType

The capacity type of the nodegroup.

public CapacityType? CapacityType { get; set; }
Property Value

CapacityType?

Remarks

Default: - ON_DEMAND

DesiredSize

The current number of worker nodes that the managed node group should maintain.

public double? DesiredSize { get; set; }
Property Value

double?

Remarks

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

Default: 2

DiskSize

The root device disk size (in GiB) for your node group instances.

public double? DiskSize { get; set; }
Property Value

double?

Remarks

Default: 20

EnableNodeAutoRepair

Specifies whether to enable node auto repair for the node group.

public bool? EnableNodeAutoRepair { get; set; }
Property Value

bool?

Remarks

Node auto repair is disabled by default.

Default: - disabled

See: https://docs.aws.amazon.com/eks/latest/userguide/node-health.html#node-auto-repair

ForceUpdate

Force the update if the existing node group's pods are unable to be drained due to a pod disruption budget issue.

public bool? ForceUpdate { get; set; }
Property Value

bool?

Remarks

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

InstanceTypes

The instance types to use for your node group.

public InstanceType[]? InstanceTypes { get; set; }
Property Value

InstanceType[]

Remarks

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

See: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-eks-nodegroup.html#cfn-eks-nodegroup-instancetypes

Labels

The Kubernetes labels to be applied to the nodes in the node group when they are created.

public IDictionary<string, string>? Labels { get; set; }
Property Value

IDictionary<string, string>

Remarks

Default: - None

LaunchTemplateSpec

Launch template specification used for the nodegroup.

public ILaunchTemplateSpec? LaunchTemplateSpec { get; set; }
Property Value

ILaunchTemplateSpec

Remarks

Default: - no launch template

See: https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html

MaxSize

The maximum number of worker nodes that the managed node group can scale out to.

public double? MaxSize { get; set; }
Property Value

double?

Remarks

Managed node groups can support up to 100 nodes by default.

Default: - desiredSize

MaxUnavailable

The maximum number of nodes unavailable at once during a version update.

public double? MaxUnavailable { get; set; }
Property Value

double?

Remarks

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: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailable

MaxUnavailablePercentage

The maximum percentage of nodes unavailable during a version update.

public double? MaxUnavailablePercentage { get; set; }
Property Value

double?

Remarks

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: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-eks-nodegroup-updateconfig.html#cfn-eks-nodegroup-updateconfig-maxunavailablepercentage

MinSize

The minimum number of worker nodes that the managed node group can scale in to.

public double? MinSize { get; set; }
Property Value

double?

Remarks

This number must be greater than or equal to zero.

Default: 1

NodeRole

The IAM role to associate with your node group.

public IRole? NodeRole { get; set; }
Property Value

IRole

Remarks

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.

NodegroupName

Name of the Nodegroup.

public string? NodegroupName { get; set; }
Property Value

string

Remarks

Default: - resource ID

ReleaseVersion

The AMI version of the Amazon EKS-optimized AMI to use with your node group (for example, 1.14.7-YYYYMMDD).

public string? ReleaseVersion { get; set; }
Property Value

string

Remarks

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

RemoteAccess

The remote access (SSH) configuration to use with your node group.

public INodegroupRemoteAccess? RemoteAccess { get; set; }
Property Value

INodegroupRemoteAccess

Remarks

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

Subnets

The subnets to use for the Auto Scaling group that is created for your node group.

public ISubnetSelection? Subnets { get; set; }
Property Value

ISubnetSelection

Remarks

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

Tags

The metadata to apply to the node group to assist with categorization and organization.

public IDictionary<string, string>? Tags { get; set; }
Property Value

IDictionary<string, string>

Remarks

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

Taints

The Kubernetes taints to be applied to the nodes in the node group when they are created.

public ITaintSpec[]? Taints { get; set; }
Property Value

ITaintSpec[]

Remarks

Default: - None

Implements

INodegroupOptions
Back to top Generated by DocFX