ClusterProps

class aws_cdk.aws_eks_legacy.ClusterProps(*, cluster_name=None, default_capacity=None, default_capacity_instance=None, kubectl_enabled=None, masters_role=None, output_cluster_name=None, output_config_command=None, output_masters_role_arn=None, role=None, security_group=None, version=None, vpc=None, vpc_subnets=None)

Bases: object

__init__(*, cluster_name=None, default_capacity=None, default_capacity_instance=None, kubectl_enabled=None, masters_role=None, output_cluster_name=None, output_config_command=None, output_masters_role_arn=None, role=None, security_group=None, version=None, vpc=None, vpc_subnets=None)

Properties to instantiate the Cluster.

Parameters
  • cluster_name (Optional[str]) – Name for the cluster. Default: - Automatically generated name

  • default_capacity (Union[int, float, None]) – Number of instances to allocate as an initial capacity for this cluster. Instance type can be configured through defaultCapacityInstanceType, which defaults to m5.large. Use cluster.addCapacity to add additional customized capacity. Set this to 0 is you wish to avoid the initial capacity allocation. Default: 2

  • default_capacity_instance (Optional[InstanceType]) – The instance type to use for the default capacity. This will only be taken into account if defaultCapacity is > 0. Default: m5.large

  • kubectl_enabled (Optional[bool]) – Allows defining kubectrl-related resources on this cluster. If this is disabled, it will not be possible to use the following capabilities: - addResource - addRoleMapping - addUserMapping - addMastersRole and props.mastersRole If this is disabled, the cluster can only be managed by issuing kubectl commands from a session that uses the IAM role/user that created the account. NOTE: changing this value will destoy the cluster. This is because a managable cluster must be created using an AWS CloudFormation custom resource which executes with an IAM role owned by the CDK app. Default: true The cluster can be managed by the AWS CDK application.

  • masters_role (Optional[IRole]) – An IAM role that will be added to the system:masters Kubernetes RBAC group. Default: - By default, it will only possible to update this Kubernetes system by adding resources to this cluster via addResource or by defining KubernetesResource resources in your AWS CDK app. Use this if you wish to grant cluster administration privileges to another role.

  • output_cluster_name (Optional[bool]) – Determines whether a CloudFormation output with the name of the cluster will be synthesized. Default: false

  • output_config_command (Optional[bool]) – 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

  • output_masters_role_arn (Optional[bool]) – Determines whether a CloudFormation output with the ARN of the “masters” IAM role will be synthesized (if mastersRole is specified). Default: false

  • role (Optional[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

  • security_group (Optional[ISecurityGroup]) – Security Group to use for Control Plane ENIs. Default: - A security group is automatically created

  • version (Optional[str]) – The Kubernetes version to run in the cluster. Default: - If not supplied, will use Amazon default version

  • vpc (Optional[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.

  • vpc_subnets (Optional[List[SubnetSelection]]) – Where to place EKS Control Plane ENIs. If you want to create public load balancers, this must include public subnets. For example, to only select private subnets, supply the following:: vpcSubnets: [ { subnetType: ec2.SubnetType.Private } ] Default: - All public and private subnets

stability :stability: deprecated

Return type

None

Attributes

cluster_name

Name for the cluster.

default :default: - Automatically generated name

stability :stability: deprecated

Return type

Optional[str]

default_capacity

Number of instances to allocate as an initial capacity for this cluster.

Instance type can be configured through defaultCapacityInstanceType, which defaults to m5.large.

Use cluster.addCapacity to add additional customized capacity. Set this to 0 is you wish to avoid the initial capacity allocation.

default :default: 2

stability :stability: deprecated

Return type

Union[int, float, None]

default_capacity_instance

The instance type to use for the default capacity.

This will only be taken into account if defaultCapacity is > 0.

default :default: m5.large

stability :stability: deprecated

Return type

Optional[InstanceType]

kubectl_enabled

Allows defining kubectrl-related resources on this cluster.

If this is disabled, it will not be possible to use the following capabilities:

  • addResource

  • addRoleMapping

  • addUserMapping

  • addMastersRole and props.mastersRole

If this is disabled, the cluster can only be managed by issuing kubectl commands from a session that uses the IAM role/user that created the account.

NOTE: changing this value will destoy the cluster. This is because a managable cluster must be created using an AWS CloudFormation custom resource which executes with an IAM role owned by the CDK app.

default :default: true The cluster can be managed by the AWS CDK application.

stability :stability: deprecated

Return type

Optional[bool]

masters_role

masters`` Kubernetes RBAC group.

default :default:

  • By default, it will only possible to update this Kubernetes system by adding resources to this cluster via addResource or by defining KubernetesResource resources in your AWS CDK app. Use this if you wish to grant cluster administration privileges to another role.

see :see: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings stability :stability: deprecated

Type

An IAM role that will be added to the ``system

Return type

Optional[IRole]

output_cluster_name

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

default :default: false

stability :stability: deprecated

Return type

Optional[bool]

output_config_command

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 :default: true

stability :stability: deprecated

Return type

Optional[bool]

output_masters_role_arn

Determines whether a CloudFormation output with the ARN of the “masters” IAM role will be synthesized (if mastersRole is specified).

default :default: false

stability :stability: deprecated

Return type

Optional[bool]

role

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

default :default: - A role is automatically created for you

stability :stability: deprecated

Return type

Optional[IRole]

security_group

Security Group to use for Control Plane ENIs.

default :default: - A security group is automatically created

stability :stability: deprecated

Return type

Optional[ISecurityGroup]

version

The Kubernetes version to run in the cluster.

default :default: - If not supplied, will use Amazon default version

stability :stability: deprecated

Return type

Optional[str]

vpc

The VPC in which to create the Cluster.

default :default: - a VPC with default configuration will be created and can be accessed through cluster.vpc.

stability :stability: deprecated

Return type

Optional[IVpc]

vpc_subnets

Where to place EKS Control Plane ENIs.

If you want to create public load balancers, this must include public subnets.

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

# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
vpcSubnets: [
   { subnetType: ec2.SubnetType.Private }
]

default :default: - All public and private subnets

stability :stability: deprecated

Return type

Optional[List[SubnetSelection]]