| Modifier and Type | Method and Description |
|---|---|
Cluster |
build() |
Cluster.Builder |
clusterName(String clusterName)
(experimental) Name for the cluster.
|
static Cluster.Builder |
create(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 |
kubectlEnabled(Boolean kubectlEnabled)
(experimental) Allows defining `kubectrl`-related resources on this cluster.
|
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 |
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 |
securityGroup(ISecurityGroup securityGroup)
(experimental) Security Group to use for Control Plane ENIs.
|
Cluster.Builder |
version(String 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(Construct scope, String id)
scope - a Construct, most likely a cdk.Stack created. This parameter is required.id - This parameter is required.Cluster.Builder.@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 defaultCapacity(Number defaultCapacity)
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.
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 kubectlEnabled(Boolean kubectlEnabled)
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.
Default: true The cluster can be managed by the AWS CDK application.
kubectlEnabled - Allows defining `kubectrl`-related resources on this cluster. This parameter is required.this@Stability(value=Experimental) public Cluster.Builder mastersRole(IRole mastersRole)
Default: - By default, it will only possible to update this Kubernetes system by adding resources to this cluster via `addResource` or by defining `KubernetesResource` resources in your AWS CDK app. Use this if you wish to grant cluster administration privileges to another role.
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=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 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 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 version(String version)
Default: - If not supplied, will use Amazon default version
version - The Kubernetes version to run in the cluster. 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.thisCopyright © 2021. All rights reserved.