@Stability(value=Stable) public static final class FargateCluster.Builder extends Object implements software.amazon.jsii.Builder<FargateCluster>
FargateCluster.| Modifier and Type | Method and Description |
|---|---|
FargateCluster |
build() |
FargateCluster.Builder |
clusterHandlerEnvironment(Map<String,String> clusterHandlerEnvironment)
Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.
|
FargateCluster.Builder |
clusterName(String clusterName)
Name for the cluster.
|
FargateCluster.Builder |
coreDnsComputeType(CoreDnsComputeType 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.
|
static FargateCluster.Builder |
create(software.constructs.Construct scope,
String id) |
FargateCluster.Builder |
defaultProfile(FargateProfileOptions defaultProfile)
Fargate Profile to create along with the cluster.
|
FargateCluster.Builder |
endpointAccess(EndpointAccess endpointAccess)
Configure access to the Kubernetes API server endpoint..
|
FargateCluster.Builder |
kubectlEnvironment(Map<String,String> kubectlEnvironment)
Environment variables for the kubectl execution.
|
FargateCluster.Builder |
kubectlLayer(ILayerVersion kubectlLayer)
An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI.
|
FargateCluster.Builder |
kubectlMemory(Size kubectlMemory)
Amount of memory to allocate to the provider's lambda function.
|
FargateCluster.Builder |
mastersRole(IRole mastersRole)
An IAM role that will be added to the `system:masters` Kubernetes RBAC group.
|
FargateCluster.Builder |
outputClusterName(Boolean outputClusterName)
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
|
FargateCluster.Builder |
outputConfigCommand(Boolean outputConfigCommand)
Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized.
|
FargateCluster.Builder |
outputMastersRoleArn(Boolean outputMastersRoleArn)
Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).
|
FargateCluster.Builder |
placeClusterHandlerInVpc(Boolean 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.
|
FargateCluster.Builder |
prune(Boolean prune)
Indicates whether Kubernetes resources added through `addManifest()` can be automatically pruned.
|
FargateCluster.Builder |
role(IRole role)
Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
|
FargateCluster.Builder |
securityGroup(ISecurityGroup securityGroup)
Security Group to use for Control Plane ENIs.
|
FargateCluster.Builder |
version(KubernetesVersion version)
The Kubernetes version to run in the cluster.
|
FargateCluster.Builder |
vpc(IVpc vpc)
The VPC in which to create the Cluster.
|
FargateCluster.Builder |
vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
Where to place EKS Control Plane ENIs.
|
@Stability(value=Stable) public static FargateCluster.Builder create(software.constructs.Construct scope, String id)
scope - This parameter is required.id - This parameter is required.FargateCluster.Builder.@Stability(value=Stable) public FargateCluster.Builder version(KubernetesVersion version)
version - The Kubernetes version to run in the cluster. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder clusterName(String clusterName)
Default: - Automatically generated name
clusterName - Name for the cluster. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder outputClusterName(Boolean outputClusterName)
Default: false
outputClusterName - Determines whether a CloudFormation output with the name of the cluster will be synthesized. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder outputConfigCommand(Boolean outputConfigCommand)
This command will include the cluster name and, if applicable, the ARN of the masters IAM role.
Default: true
outputConfigCommand - Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder role(IRole role)
Default: - A role is automatically created for you
role - Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder securityGroup(ISecurityGroup securityGroup)
Default: - A security group is automatically created
securityGroup - Security Group to use for Control Plane ENIs. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder vpc(IVpc vpc)
Default: - a VPC with default configuration will be created and can be accessed through `cluster.vpc`.
vpc - The VPC in which to create the Cluster. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
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 }
]
Default: - All public and private subnets
vpcSubnets - Where to place EKS Control Plane ENIs. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder clusterHandlerEnvironment(Map<String,String> clusterHandlerEnvironment)
Default: - No environment variables.
clusterHandlerEnvironment - Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder coreDnsComputeType(CoreDnsComputeType coreDnsComputeType)
Default: CoreDnsComputeType.EC2 (for `FargateCluster` the default is FARGATE)
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 parameter is required.this@Stability(value=Stable) public FargateCluster.Builder endpointAccess(EndpointAccess endpointAccess)
Default: EndpointAccess.PUBLIC_AND_PRIVATE
endpointAccess - Configure access to the Kubernetes API server endpoint.. This parameter is required.thishttps://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html@Stability(value=Stable) public FargateCluster.Builder kubectlEnvironment(Map<String,String> kubectlEnvironment)
Only relevant for kubectl enabled clusters.
Default: - No environment variables.
kubectlEnvironment - Environment variables for the kubectl execution. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder kubectlLayer(ILayerVersion kubectlLayer)
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
Object layer = LayerVersion.Builder.create(this, "kubectl-layer")
.code(lambda.Code.fromAsset(String.format("%s/layer.zip", __dirname)))
.build();
Object compatibleRuntimes;
Default: - the layer provided by the `aws-lambda-layer-kubectl` SAR app.
kubectlLayer - An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI. This parameter is required.thishttps://github.com/aws-samples/aws-lambda-layer-kubectl@Stability(value=Stable) public FargateCluster.Builder kubectlMemory(Size kubectlMemory)
Default: Size.gibibytes(1)
kubectlMemory - Amount of memory to allocate to the provider's lambda function. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder mastersRole(IRole mastersRole)
Default: - a role that assumable by anyone with permissions in the same account will automatically be defined
mastersRole - An IAM role that will be added to the `system:masters` Kubernetes RBAC group. This parameter is required.thishttps://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings@Stability(value=Stable) public FargateCluster.Builder outputMastersRoleArn(Boolean outputMastersRoleArn)
Default: false
outputMastersRoleArn - Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified). This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder placeClusterHandlerInVpc(Boolean placeClusterHandlerInVpc)
Default: false
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 parameter is required.this@Stability(value=Stable) public FargateCluster.Builder prune(Boolean prune)
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.
Default: true
prune - Indicates whether Kubernetes resources added through `addManifest()` can be automatically pruned. This parameter is required.this@Stability(value=Stable) public FargateCluster.Builder defaultProfile(FargateProfileOptions defaultProfile)
Default: - A profile called "default" with 'default' and 'kube-system' selectors will be created if this is left undefined.
defaultProfile - Fargate Profile to create along with the cluster. This parameter is required.this@Stability(value=Stable) public FargateCluster build()
build in interface software.amazon.jsii.Builder<FargateCluster>Copyright © 2021. All rights reserved.