@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 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.addAutoScalingGroupCapacity
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 defaultCapacityType(DefaultCapacityType defaultCapacityType)
ClusterProps.getDefaultCapacityType()
defaultCapacityType
- The default capacity type for the cluster.this
@Stability(value=Experimental) public ClusterProps.Builder clusterHandlerEnvironment(Map<String,String> clusterHandlerEnvironment)
ClusterOptions.getClusterHandlerEnvironment()
clusterHandlerEnvironment
- Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.this
@Stability(value=Experimental) public ClusterProps.Builder coreDnsComputeType(CoreDnsComputeType coreDnsComputeType)
ClusterOptions.getCoreDnsComputeType()
coreDnsComputeType
- Controls the "eks.amazonaws.com/compute-type" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.this
@Stability(value=Experimental) public ClusterProps.Builder endpointAccess(EndpointAccess endpointAccess)
ClusterOptions.getEndpointAccess()
endpointAccess
- Configure access to the Kubernetes API server endpoint..this
@Stability(value=Experimental) public ClusterProps.Builder kubectlEnvironment(Map<String,String> kubectlEnvironment)
ClusterOptions.getKubectlEnvironment()
kubectlEnvironment
- Environment variables for the kubectl execution.
Only relevant for kubectl enabled clusters.this
@Stability(value=Experimental) public ClusterProps.Builder kubectlLayer(ILayerVersion kubectlLayer)
ClusterOptions.getKubectlLayer()
kubectlLayer
- An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI.
By default, the provider will use the layer included in the
"aws-lambda-layer-kubectl" SAR application which is available in all
commercial regions.
To deploy the layer locally, visit https://github.com/aws-samples/aws-lambda-layer-kubectl/blob/master/cdk/README.md for instructions on how to prepare the .zip file and then define it in your app as follows:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 LayerVersion layer = new LayerVersion(this, "kubectl-layer", new LayerVersionProps() .code(lambda.Code.fromAsset(String.format("%s/layer.zip", __dirname)))); Object compatibleRuntimes;
this
@Stability(value=Experimental) public ClusterProps.Builder kubectlMemory(Size kubectlMemory)
ClusterOptions.getKubectlMemory()
kubectlMemory
- Amount of memory to allocate to the provider's lambda function.this
@Stability(value=Experimental) public ClusterProps.Builder mastersRole(IRole mastersRole)
ClusterOptions.getMastersRole()
mastersRole
- An IAM role that will be added to the `system:masters` Kubernetes RBAC group.this
@Stability(value=Experimental) public ClusterProps.Builder outputMastersRoleArn(Boolean outputMastersRoleArn)
ClusterOptions.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 placeClusterHandlerInVpc(Boolean placeClusterHandlerInVpc)
ClusterOptions.getPlaceClusterHandlerInVpc()
placeClusterHandlerInVpc
- If set to true, the cluster handler functions will be placed in the private subnets of the cluster vpc, subject to the `vpcSubnets` selection strategy.this
@Stability(value=Experimental) public ClusterProps.Builder prune(Boolean prune)
ClusterOptions.getPrune()
prune
- Indicates whether Kubernetes resources added through `addManifest()` can be automatically pruned.
When this is enabled (default), prune labels will be
allocated and injected to each resource. These labels will then be used
when issuing the kubectl apply
operation with the --prune
switch.this
@Stability(value=Experimental) public ClusterProps.Builder secretsEncryptionKey(IKey secretsEncryptionKey)
ClusterOptions.getSecretsEncryptionKey()
secretsEncryptionKey
- KMS secret for envelope encryption for Kubernetes secrets.this
@Stability(value=Experimental) public ClusterProps.Builder version(KubernetesVersion version)
CommonClusterOptions.getVersion()
version
- The Kubernetes version to run in the cluster. This parameter is required.this
@Stability(value=Experimental) public ClusterProps.Builder clusterName(String clusterName)
CommonClusterOptions.getClusterName()
clusterName
- Name for the cluster.this
@Stability(value=Experimental) public ClusterProps.Builder outputClusterName(Boolean outputClusterName)
CommonClusterOptions.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)
CommonClusterOptions.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 role(IRole role)
CommonClusterOptions.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)
CommonClusterOptions.getSecurityGroup()
securityGroup
- Security Group to use for Control Plane ENIs.this
@Stability(value=Experimental) public ClusterProps.Builder vpc(IVpc vpc)
CommonClusterOptions.getVpc()
vpc
- The VPC in which to create the Cluster.this
@Stability(value=Experimental) public ClusterProps.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
CommonClusterOptions.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:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 vpcSubnets: [ { subnetType: ec2.SubnetType.Private } ]
this
@Stability(value=Experimental) public ClusterProps build()
build
in interface software.amazon.jsii.Builder<ClusterProps>
ClusterProps
NullPointerException
- if any required attribute was not providedCopyright © 2021. All rights reserved.