@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=Deprecated) @Deprecated public ClusterProps.Builder kubectlEnabled(Boolean kubectlEnabled)
ClusterProps.getKubectlEnabled()kubectlEnabled - NOT SUPPORTED: We no longer allow disabling kubectl-support. Setting this option to `false` will throw an error.
To temporary allow you to retain existing clusters created with
kubectlEnabled: false, you can use eks.LegacyCluster class, which is a
drop-in replacement for eks.Cluster with kubectlEnabled: false.
Bear in mind that this is a temporary workaround. We have plans to remove
eks.LegacyCluster. If you have a use case for using eks.LegacyCluster,
please add a comment here https://github.com/aws/aws-cdk/issues/9332 and
let us know so we can make sure to continue to support your use case with
eks.Cluster. This issue also includes additional context into why this
class is being removed.
this@Stability(value=Experimental) public ClusterProps.Builder secretsEncryptionKey(IKey secretsEncryptionKey)
ClusterProps.getSecretsEncryptionKey()secretsEncryptionKey - KMS secret for envelope encryption for Kubernetes secrets.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
var layer = LayerVersion.Builder.create(this, "kubectl-layer")
.code(lambda.Code.fromAsset(__dirname + "/layer.zip"))
.build();
var compatibleRuntimes = ;
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 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>ClusterPropsNullPointerException - if any required attribute was not providedCopyright © 2020. All rights reserved.