Modifier and Type | Method and Description |
---|---|
Cluster |
build() |
Cluster.Builder |
clusterHandlerEnvironment(Map<String,String> clusterHandlerEnvironment)
(experimental) Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.
|
Cluster.Builder |
clusterName(String clusterName)
(experimental) Name for the cluster.
|
Cluster.Builder |
coreDnsComputeType(CoreDnsComputeType coreDnsComputeType)
(experimental) 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 Cluster.Builder |
create(software.constructs.Construct scope,
String id) |
Cluster.Builder |
defaultCapacity(Number defaultCapacity)
(experimental) Number of instances to allocate as an initial capacity for this cluster.
|
Cluster.Builder |
defaultCapacityInstance(InstanceType defaultCapacityInstance)
(experimental) The instance type to use for the default capacity.
|
Cluster.Builder |
defaultCapacityType(DefaultCapacityType defaultCapacityType)
(experimental) The default capacity type for the cluster.
|
Cluster.Builder |
endpointAccess(EndpointAccess endpointAccess)
(experimental) Configure access to the Kubernetes API server endpoint..
|
Cluster.Builder |
kubectlEnvironment(Map<String,String> kubectlEnvironment)
(experimental) Environment variables for the kubectl execution.
|
Cluster.Builder |
kubectlLayer(ILayerVersion kubectlLayer)
(experimental) An AWS Lambda Layer which includes `kubectl`, Helm and the AWS CLI.
|
Cluster.Builder |
kubectlMemory(Size kubectlMemory)
(experimental) Amount of memory to allocate to the provider's lambda function.
|
Cluster.Builder |
mastersRole(IRole mastersRole)
(experimental) An IAM role that will be added to the `system:masters` Kubernetes RBAC group.
|
Cluster.Builder |
outputClusterName(Boolean outputClusterName)
(experimental) Determines whether a CloudFormation output with the name of the cluster will be synthesized.
|
Cluster.Builder |
outputConfigCommand(Boolean outputConfigCommand)
(experimental) Determines whether a CloudFormation output with the `aws eks update-kubeconfig` command will be synthesized.
|
Cluster.Builder |
outputMastersRoleArn(Boolean outputMastersRoleArn)
(experimental) Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if `mastersRole` is specified).
|
Cluster.Builder |
placeClusterHandlerInVpc(Boolean placeClusterHandlerInVpc)
(experimental) 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.
|
Cluster.Builder |
prune(Boolean prune)
(experimental) Indicates whether Kubernetes resources added through `addManifest()` can be automatically pruned.
|
Cluster.Builder |
role(IRole role)
(experimental) Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
|
Cluster.Builder |
secretsEncryptionKey(IKey secretsEncryptionKey)
(experimental) KMS secret for envelope encryption for Kubernetes secrets.
|
Cluster.Builder |
securityGroup(ISecurityGroup securityGroup)
(experimental) Security Group to use for Control Plane ENIs.
|
Cluster.Builder |
version(KubernetesVersion version)
(experimental) The Kubernetes version to run in the cluster.
|
Cluster.Builder |
vpc(IVpc vpc)
(experimental) The VPC in which to create the Cluster.
|
Cluster.Builder |
vpcSubnets(List<? extends SubnetSelection> vpcSubnets)
(experimental) Where to place EKS Control Plane ENIs.
|
@Stability(value=Experimental) public static Cluster.Builder create(software.constructs.Construct scope, String id)
scope
- a Construct, most likely a cdk.Stack created. This parameter is required.id
- the id of the Construct to create. This parameter is required.Cluster.Builder
.@Stability(value=Experimental) public Cluster.Builder version(KubernetesVersion version)
version
- The Kubernetes version to run in the cluster. This parameter is required.this
@Stability(value=Experimental) public Cluster.Builder clusterName(String clusterName)
Default: - Automatically generated name
clusterName
- Name for the cluster. This parameter is required.this
@Stability(value=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.Builder endpointAccess(EndpointAccess endpointAccess)
Default: EndpointAccess.PUBLIC_AND_PRIVATE
endpointAccess
- Configure access to the Kubernetes API server endpoint.. This parameter is required.this
https://docs.aws.amazon.com/eks/latest/userguide/cluster-endpoint.html
@Stability(value=Experimental) public Cluster.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=Experimental) public Cluster.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 LayerVersion layer = new LayerVersion(this, "kubectl-layer", new LayerVersionProps() .code(lambda.Code.fromAsset(String.format("%s/layer.zip", __dirname)))); 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.this
https://github.com/aws-samples/aws-lambda-layer-kubectl
@Stability(value=Experimental) public Cluster.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=Experimental) public Cluster.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.this
https://kubernetes.io/docs/reference/access-authn-authz/rbac/#default-roles-and-role-bindings
@Stability(value=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.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=Experimental) public Cluster.Builder secretsEncryptionKey(IKey secretsEncryptionKey)
Default: - By default, Kubernetes stores all secret object data within etcd and all etcd volumes used by Amazon EKS are encrypted at the disk-level using AWS-Managed encryption keys.
secretsEncryptionKey
- KMS secret for envelope encryption for Kubernetes secrets. This parameter is required.this
@Stability(value=Experimental) public Cluster.Builder defaultCapacity(Number defaultCapacity)
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.
Default: 2
defaultCapacity
- Number of instances to allocate as an initial capacity for this cluster. This parameter is required.this
@Stability(value=Experimental) public Cluster.Builder defaultCapacityInstance(InstanceType defaultCapacityInstance)
This will only be taken
into account if defaultCapacity
is > 0.
Default: m5.large
defaultCapacityInstance
- The instance type to use for the default capacity. This parameter is required.this
@Stability(value=Experimental) public Cluster.Builder defaultCapacityType(DefaultCapacityType defaultCapacityType)
Default: NODEGROUP
defaultCapacityType
- The default capacity type for the cluster. This parameter is required.this
Copyright © 2021. All rights reserved.