interface ClusterProps
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EKS.Legacy.ClusterProps |
Java | software.amazon.awscdk.services.eks.legacy.ClusterProps |
Python | aws_cdk.aws_eks_legacy.ClusterProps |
TypeScript (source) | @aws-cdk/aws-eks-legacy » ClusterProps |
⚠️ Deprecated: undefined
Properties to instantiate the Cluster.
Example
new eks.Cluster(this, 'cluster', {
defaultCapacity: 10,
defaultCapacityInstance: new ec2.InstanceType('m2.xlarge'),
});
Properties
Name | Type | Description |
---|---|---|
cluster | string | Name for the cluster. |
default | number | Number of instances to allocate as an initial capacity for this cluster. |
default | Instance | The instance type to use for the default capacity. |
kubectl | boolean | Allows defining kubectrl -related resources on this cluster. |
masters | IRole | An IAM role that will be added to the system:masters Kubernetes RBAC group. |
output | boolean | Determines whether a CloudFormation output with the name of the cluster will be synthesized. |
output | boolean | Determines whether a CloudFormation output with the aws eks update-kubeconfig command will be synthesized. |
output | boolean | Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified). |
role? | IRole | Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf. |
security | ISecurity | Security Group to use for Control Plane ENIs. |
version? | string | The Kubernetes version to run in the cluster. |
vpc? | IVpc | The VPC in which to create the Cluster. |
vpc | Subnet [] | Where to place EKS Control Plane ENIs. |
clusterName?
⚠️ Deprecated: undefined
Type:
string
(optional, default: Automatically generated name)
Name for the cluster.
defaultCapacity?
⚠️ Deprecated: undefined
Type:
number
(optional, default: 2)
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.
defaultCapacityInstance?
⚠️ Deprecated: undefined
Type:
Instance
(optional, default: m5.large)
The instance type to use for the default capacity.
This will only be taken
into account if defaultCapacity
is > 0.
kubectlEnabled?
⚠️ Deprecated: undefined
Type:
boolean
(optional, default: true The cluster can be managed by the AWS CDK application.)
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
andprops.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.
mastersRole?
⚠️ Deprecated: undefined
Type:
IRole
(optional, 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.)
An IAM role that will be added to the system:masters
Kubernetes RBAC group.
See also: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings
outputClusterName?
⚠️ Deprecated: undefined
Type:
boolean
(optional, default: false)
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
outputConfigCommand?
⚠️ Deprecated: undefined
Type:
boolean
(optional, default: true)
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.
outputMastersRoleArn?
⚠️ Deprecated: undefined
Type:
boolean
(optional, default: false)
Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole
is specified).
role?
⚠️ Deprecated: undefined
Type:
IRole
(optional, default: A role is automatically created for you)
Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
securityGroup?
⚠️ Deprecated: undefined
Type:
ISecurity
(optional, default: A security group is automatically created)
Security Group to use for Control Plane ENIs.
version?
⚠️ Deprecated: undefined
Type:
string
(optional, default: If not supplied, will use Amazon default version)
The Kubernetes version to run in the cluster.
vpc?
⚠️ Deprecated: undefined
Type:
IVpc
(optional, default: a VPC with default configuration will be created and can be accessed through cluster.vpc
.)
The VPC in which to create the Cluster.
vpcSubnets?
⚠️ Deprecated: undefined
Type:
Subnet
[]
(optional, default: All public and private 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:
const vpcSubnets = [
{ subnetType: ec2.SubnetType.PRIVATE_WITH_NAT }
]