@Stability(value=Experimental) public static final class ClusterProps.Builder extends Object implements software.amazon.jsii.Builder<ClusterProps>
ClusterProps| Constructor and Description |
|---|
Builder() |
@Stability(value=Experimental) public ClusterProps.Builder clusterName(String clusterName)
ClusterProps.getClusterName()clusterName - Name for the cluster.this@Stability(value=Experimental) public ClusterProps.Builder defaultCapacity(Number defaultCapacity)
ClusterProps.getDefaultCapacity()defaultCapacity - 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.
this@Stability(value=Experimental) public ClusterProps.Builder defaultCapacityInstance(InstanceType defaultCapacityInstance)
ClusterProps.getDefaultCapacityInstance()defaultCapacityInstance - The instance type to use for the default capacity.
This will only be taken
into account if defaultCapacity is > 0.this@Stability(value=Experimental) public ClusterProps.Builder kubectlEnabled(Boolean kubectlEnabled)
ClusterProps.getKubectlEnabled()kubectlEnabled - Allows defining `kubectrl`-related resources on this cluster.
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.
this@Stability(value=Experimental) public ClusterProps.Builder mastersRole(IRole mastersRole)
ClusterProps.getMastersRole()mastersRole - An IAM role that will be added to the `system:masters` Kubernetes RBAC group.this@Stability(value=Experimental) public ClusterProps.Builder outputClusterName(Boolean outputClusterName)
ClusterProps.getOutputClusterName()outputClusterName - Determines whether a CloudFormation output with the name of the cluster will be synthesized.this@Stability(value=Experimental) public ClusterProps.Builder outputConfigCommand(Boolean outputConfigCommand)
ClusterProps.getOutputConfigCommand()outputConfigCommand - 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.this@Stability(value=Experimental) public ClusterProps.Builder outputMastersRoleArn(Boolean outputMastersRoleArn)
ClusterProps.getOutputMastersRoleArn()outputMastersRoleArn - Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).this@Stability(value=Experimental) public ClusterProps.Builder role(IRole role)
ClusterProps.getRole()role - Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.this@Stability(value=Experimental) public ClusterProps.Builder securityGroup(ISecurityGroup securityGroup)
ClusterProps.getSecurityGroup()securityGroup - Security Group to use for Control Plane ENIs.this@Stability(value=Experimental) public ClusterProps.Builder version(String version)
ClusterProps.getVersion()version - The Kubernetes version to run in the cluster.this@Stability(value=Experimental) public ClusterProps.Builder vpc(IVpc vpc)
ClusterProps.getVpc()vpc - The VPC in which to create the Cluster.this@Stability(value=Experimental) public ClusterProps.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
ClusterProps.getVpcSubnets()vpcSubnets - 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:
Map<String, SubnetType>[] vpcSubnets = List.of(Map.of("subnetType", SubnetType.PRIVATE_WITH_NAT));
this@Stability(value=Experimental) public ClusterProps build()
build in interface software.amazon.jsii.Builder<ClusterProps>ClusterPropsNullPointerException - if any required attribute was not providedCopyright © 2022. All rights reserved.