@Generated(value="jsii-pacmak/1.58.0 (build f8ba112)", date="2022-05-11T19:24:30.104Z") @Stability(value=Experimental) public interface ClusterProps extends software.amazon.jsii.JsiiSerializable
Example:
Cluster.Builder.create(this, "cluster")
.defaultCapacity(10)
.defaultCapacityInstance(new InstanceType("m2.xlarge"))
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
ClusterProps.Builder
A builder for
ClusterProps |
static class |
ClusterProps.Jsii$Proxy
An implementation for
ClusterProps |
| Modifier and Type | Method and Description |
|---|---|
static ClusterProps.Builder |
builder() |
default String |
getClusterName()
(experimental) Name for the cluster.
|
default Number |
getDefaultCapacity()
(experimental) Number of instances to allocate as an initial capacity for this cluster.
|
default InstanceType |
getDefaultCapacityInstance()
(experimental) The instance type to use for the default capacity.
|
default Boolean |
getKubectlEnabled()
(experimental) Allows defining `kubectrl`-related resources on this cluster.
|
default IRole |
getMastersRole()
(experimental) An IAM role that will be added to the `system:masters` Kubernetes RBAC group.
|
default Boolean |
getOutputClusterName()
(experimental) Determines whether a CloudFormation output with the name of the cluster will be synthesized.
|
default Boolean |
getOutputConfigCommand()
(experimental) Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized.
|
default Boolean |
getOutputMastersRoleArn()
(experimental) Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).
|
default IRole |
getRole()
(experimental) Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
|
default ISecurityGroup |
getSecurityGroup()
(experimental) Security Group to use for Control Plane ENIs.
|
default String |
getVersion()
(experimental) The Kubernetes version to run in the cluster.
|
default IVpc |
getVpc()
(experimental) The VPC in which to create the Cluster.
|
default List<SubnetSelection> |
getVpcSubnets()
(experimental) Where to place EKS Control Plane ENIs.
|
@Stability(value=Experimental) @Nullable default String getClusterName()
Default: - Automatically generated name
@Stability(value=Experimental) @Nullable default Number getDefaultCapacity()
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
@Stability(value=Experimental) @Nullable default InstanceType getDefaultCapacityInstance()
This will only be taken
into account if defaultCapacity is > 0.
Default: m5.large
@Stability(value=Experimental) @Nullable default Boolean getKubectlEnabled()
If this is disabled, it will not be possible to use the following capabilities:
addResourceaddRoleMappingaddUserMappingaddMastersRole 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.
@Stability(value=Experimental) @Nullable default IRole getMastersRole()
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.
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings@Stability(value=Experimental) @Nullable default Boolean getOutputClusterName()
Default: false
@Stability(value=Experimental) @Nullable default Boolean getOutputConfigCommand()
This command will include the cluster name and, if applicable, the ARN of the masters IAM role.
Default: true
@Stability(value=Experimental) @Nullable default Boolean getOutputMastersRoleArn()
Default: false
@Stability(value=Experimental) @Nullable default IRole getRole()
Default: - A role is automatically created for you
@Stability(value=Experimental) @Nullable default ISecurityGroup getSecurityGroup()
Default: - A security group is automatically created
@Stability(value=Experimental) @Nullable default String getVersion()
Default: - If not supplied, will use Amazon default version
@Stability(value=Experimental) @Nullable default IVpc getVpc()
Default: - a VPC with default configuration will be created and can be accessed through `cluster.vpc`.
@Stability(value=Experimental) @Nullable default List<SubnetSelection> getVpcSubnets()
If you want to create public load balancers, this must include public subnets.
For example, to only select private subnets, supply the following:
Map<String, SubnetType>[] vpcSubnets = List.of(Map.of("subnetType", SubnetType.PRIVATE));
Default: - All public and private subnets
@Stability(value=Experimental) static ClusterProps.Builder builder()
ClusterProps.Builder of ClusterPropsCopyright © 2022. All rights reserved.