CommonClusterOptions
- class aws_cdk.aws_eks.CommonClusterOptions(*, version, cluster_name=None, output_cluster_name=None, output_config_command=None, role=None, security_group=None, vpc=None, vpc_subnets=None)
Bases:
object
Options for configuring an EKS cluster.
- Parameters:
version (
KubernetesVersion
) – The Kubernetes version to run in the cluster.cluster_name (
Optional
[str
]) – Name for the cluster. Default: - Automatically generated nameoutput_cluster_name (
Optional
[bool
]) – Determines whether a CloudFormation output with the name of the cluster will be synthesized. Default: falseoutput_config_command (
Optional
[bool
]) – Determines whether a CloudFormation output with theaws 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: truerole (
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 yousecurity_group (
Optional
[ISecurityGroup
]) – Security Group to use for Control Plane ENIs. Default: - A security group is automatically createdvpc (
Optional
[IVpc
]) – The VPC in which to create the Cluster. Default: - a VPC with default configuration will be created and can be accessed throughcluster.vpc
.vpc_subnets (
Optional
[Sequence
[Union
[SubnetSelection
,Dict
[str
,Any
]]]]) – 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_WITH_NAT }]
Default: - All public and private subnets
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_ec2 as ec2 import aws_cdk.aws_eks as eks import aws_cdk.aws_iam as iam # kubernetes_version: eks.KubernetesVersion # role: iam.Role # security_group: ec2.SecurityGroup # subnet: ec2.Subnet # subnet_filter: ec2.SubnetFilter # vpc: ec2.Vpc common_cluster_options = eks.CommonClusterOptions( version=kubernetes_version, # the properties below are optional cluster_name="clusterName", output_cluster_name=False, output_config_command=False, role=role, security_group=security_group, vpc=vpc, vpc_subnets=[ec2.SubnetSelection( availability_zones=["availabilityZones"], one_per_az=False, subnet_filters=[subnet_filter], subnet_group_name="subnetGroupName", subnet_name="subnetName", subnets=[subnet], subnet_type=ec2.SubnetType.ISOLATED )] )
Attributes
- cluster_name
Name for the cluster.
- Default:
Automatically generated name
- output_cluster_name
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
- Default:
false
- 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:
true
- role
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
Security Group to use for Control Plane ENIs.
- Default:
A security group is automatically created
- version
The Kubernetes version to run in the cluster.
- vpc
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
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_WITH_NAT }]
- Default:
All public and private subnets