Configuration options for the cluster provider.

interface MngClusterProviderProps {
    amiReleaseVersion?: string;
    amiType?: NodegroupAmiType;
    clusterName?: string;
    desiredSize?: number;
    diskSize?: number;
    enableSsmPermissions?: boolean;
    forceUpdate?: boolean;
    id?: string;
    instanceTypes?: InstanceType[];
    labels?: {
        [name: string]: string;
    };
    launchTemplate?: LaunchTemplateProps;
    launchTemplateSpec?: LaunchTemplateSpec;
    maxSize?: number;
    maxUnavailable?: number;
    maxUnavailablePercentage?: number;
    minSize?: number;
    name?: string;
    nodeGroupCapacityType?: CapacityType;
    nodeGroupSubnets?: SubnetSelection;
    nodeGroupTags?: {
        [key: string]: string;
    };
    nodeRole?: IRole;
    nodegroupName?: string;
    outputClusterName?: boolean;
    outputConfigCommand?: boolean;
    privateCluster?: boolean;
    remoteAccess?: NodegroupRemoteAccess;
    role?: IRole;
    securityGroup?: ISecurityGroup;
    tags?: {
        [key: string]: string;
    };
    taints?: TaintSpec[];
    version?: KubernetesVersion;
    vpc?: IVpc;
    vpcSubnets?: SubnetSelection[];
}

Hierarchy

  • Partial<eks.CommonClusterOptions>
  • Omit<ManagedNodeGroup, "id">
    • MngClusterProviderProps

Properties

amiReleaseVersion?: string

This property is used to upgrade node groups to the latest kubelet by upgrading node group AMI. Look up the versions here (mapped to Kubernetes version): https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html

amiType?: NodegroupAmiType

Choose AMI type for the managed node group.

clusterName?: string

Name for the cluster.

Default

- Automatically generated name
desiredSize?: number

Desired size, defaults to min size.

diskSize?: number

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

Default

20
enableSsmPermissions?: boolean

If set to true will add AmazonSSMManagedInstanceCore to the node role.

forceUpdate?: boolean

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
id?: string

In this case id is optional and defaults tp the cluster name

instanceTypes?: InstanceType[]

Instance types used for the node group. Multiple types makes sense if capacity type is SPOT.

Default

m5.large
labels?: {
    [name: string]: string;
}

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

Type declaration

  • [name: string]: string

Default

- None
launchTemplate?: LaunchTemplateProps

The Launch Template properties for the Nodes. amiType and amiReleaseVersion will be ignored if this is set.

launchTemplateSpec?: LaunchTemplateSpec

Launch template specification used for the nodegroup

maxSize?: number

Max size of the node group.

Default

3
maxUnavailable?: number

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.

maxUnavailablePercentage?: number

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.

minSize?: number

Min size of the node group

Default

1
name?: string

The name for the cluster.

Deprecated

use #clusterName

nodeGroupCapacityType?: CapacityType

Select either SPOT or ON-DEMAND

nodeGroupSubnets?: SubnetSelection

Subnets for the autoscaling group where nodes (instances) will be placed.

Default

all private subnets
nodeGroupTags?: {
    [key: string]: string;
}

Tags for the node group.

Type declaration

  • [key: string]: string
nodeRole?: 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.
nodegroupName?: string

Name of the Nodegroup

Default

- resource ID
outputClusterName?: boolean

Determines whether a CloudFormation output with the name of the cluster will be synthesized.

Default

false
outputConfigCommand?: boolean

Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized. This command will include the cluster name and, if applicable, the ARN of the masters IAM role.

Default

true
privateCluster?: boolean

Is it a private only EKS Cluster? Defaults to private_and_public cluster, set to true for private cluster

Default

false
remoteAccess?: 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

- disabled
role?: IRole

Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

Default

- A role is automatically created for you
securityGroup?: ISecurityGroup

Security Group to use for Control Plane ENIs

Default

- A security group is automatically created
tags?: {
    [key: string]: string;
}

Tags for the Cluster.

Type declaration

  • [key: string]: string
taints?: TaintSpec[]

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

Default

- None
version?: KubernetesVersion

The Kubernetes version to run in the cluster

vpc?: IVpc

The VPC in which to create the Cluster.

Default

  • a VPC with default configuration will be created and can be accessed through cluster.vpc.
vpcSubnets?: SubnetSelection[]

Where to place EKS Control Plane ENIs

For example, to only select private subnets, supply the following:

vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS }]

Default

- All public and private subnets

Generated using TypeDoc