@Generated(value="jsii-pacmak/1.14.1 (build 828de8a)", date="2020-11-24T22:28:23.744Z") @Stability(value=Experimental) public class LegacyCluster extends Resource implements ICluster
This is a fully managed cluster of API Servers (control-plane) The user is still required to create the worker nodes.
| Modifier and Type | Class and Description |
|---|---|
static class |
LegacyCluster.Builder
(experimental) A fluent builder for
LegacyCluster. |
software.amazon.jsii.JsiiObject.InitializationModeICluster.Jsii$Default, ICluster.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
LegacyCluster(software.constructs.Construct scope,
String id,
LegacyClusterProps props)
(experimental) Initiates an EKS Cluster with the supplied arguments.
|
protected |
LegacyCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
LegacyCluster(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAutoScalingGroup(AutoScalingGroup autoScalingGroup,
AutoScalingGroupOptions options)
(experimental) Add compute capacity to this EKS cluster in the form of an AutoScalingGroup.
|
AutoScalingGroup |
addCapacity(String id,
AutoScalingGroupCapacityOptions options)
(experimental) Add nodes to this EKS cluster.
|
KubernetesManifest |
addCdk8sChart(String _id,
software.constructs.Construct _chart)
(experimental) Defines a CDK8s chart in this cluster.
|
HelmChart |
addHelmChart(String _id,
HelmChartOptions _options)
(experimental) Defines a Helm chart in this cluster.
|
KubernetesManifest |
addManifest(String _id,
Object... _manifest)
(experimental) Defines a Kubernetes resource in this cluster.
|
Nodegroup |
addNodegroup(String id)
(experimental) Add managed nodegroup to this Amazon EKS cluster.
|
Nodegroup |
addNodegroup(String id,
NodegroupOptions options)
(experimental) Add managed nodegroup to this Amazon EKS cluster.
|
ServiceAccount |
addServiceAccount(String _id)
(experimental) Creates a new service account with corresponding IAM Role (IRSA).
|
ServiceAccount |
addServiceAccount(String _id,
ServiceAccountOptions _options)
(experimental) Creates a new service account with corresponding IAM Role (IRSA).
|
static ICluster |
fromClusterAttributes(software.constructs.Construct scope,
String id,
ClusterAttributes attrs)
(experimental) Import an existing cluster.
|
String |
getClusterArn()
(experimental) The AWS generated ARN for the Cluster resource.
|
String |
getClusterCertificateAuthorityData()
(experimental) The certificate-authority-data for your cluster.
|
String |
getClusterEncryptionConfigKeyArn()
(experimental) Amazon Resource Name (ARN) or alias of the customer master key (CMK).
|
String |
getClusterEndpoint()
(experimental) The endpoint URL for the Cluster.
|
String |
getClusterName()
(experimental) The Name of the created EKS Cluster.
|
String |
getClusterSecurityGroupId()
(experimental) The cluster security group that was created by Amazon EKS for the cluster.
|
Connections |
getConnections()
(experimental) Manages connection rules (Security Group Rules) for the cluster.
|
AutoScalingGroup |
getDefaultCapacity()
(experimental) The auto scaling group that hosts the default capacity for this cluster.
|
Nodegroup |
getDefaultNodegroup()
(experimental) The node group that hosts the default capacity for this cluster.
|
IOpenIdConnectProvider |
getOpenIdConnectProvider()
(experimental) Since we dont really want to make it required on the top-level ICluster we do this trick here in return type to match interface type.
|
IRole |
getRole()
(experimental) IAM role assumed by the EKS Control Plane.
|
IVpc |
getVpc()
(experimental) The VPC in which this Cluster was created.
|
generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStackgetNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validatejsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetKubectlEnvironment, getKubectlLayer, getKubectlPrivateSubnets, getKubectlRole, getKubectlSecurityGroupgetNodeprotected LegacyCluster(software.amazon.jsii.JsiiObjectRef objRef)
protected LegacyCluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public LegacyCluster(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
LegacyClusterProps props)
scope - a Construct, most likely a cdk.Stack created. This parameter is required.id - This parameter is required.props - properties in the IClusterProps interface. This parameter is required.@Stability(value=Experimental) @NotNull public static ICluster fromClusterAttributes(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull ClusterAttributes attrs)
scope - the construct scope, in most cases 'this'. This parameter is required.id - the id or name to import as. This parameter is required.attrs - the cluster properties to use for importing information. This parameter is required.@Stability(value=Experimental)
public void addAutoScalingGroup(@NotNull
AutoScalingGroup autoScalingGroup,
@NotNull
AutoScalingGroupOptions options)
The AutoScalingGroup must be running an EKS-optimized AMI containing the /etc/eks/bootstrap.sh script. This method will configure Security Groups, add the right policies to the instance role, apply the right tags, and add the required user data to the instance's launch configuration.
Spot instances will be labeled lifecycle=Ec2Spot and tainted with PreferNoSchedule.
If kubectl is enabled, the
spot interrupt handler
daemon will be installed on all spot instances to handle
EC2 Spot Instance Termination Notices.
Prefer to use addCapacity if possible.
autoScalingGroup - [disable-awslint:ref-via-interface]. This parameter is required.options - options for adding auto scaling groups, like customizing the bootstrap script. This parameter is required.https://docs.aws.amazon.com/eks/latest/userguide/launch-workers.html@Stability(value=Experimental) @NotNull public AutoScalingGroup addCapacity(@NotNull String id, @NotNull AutoScalingGroupCapacityOptions options)
The nodes will automatically be configured with the right VPC and AMI for the instance type and Kubernetes version.
Spot instances will be labeled lifecycle=Ec2Spot and tainted with PreferNoSchedule.
id - This parameter is required.options - This parameter is required.@Stability(value=Experimental) @NotNull public KubernetesManifest addCdk8sChart(@NotNull String _id, @NotNull software.constructs.Construct _chart)
addCdk8sChart in interface ICluster_id - This parameter is required._chart - This parameter is required.@Stability(value=Experimental) @NotNull public HelmChart addHelmChart(@NotNull String _id, @NotNull HelmChartOptions _options)
addHelmChart in interface ICluster_id - This parameter is required._options - This parameter is required.@Stability(value=Experimental) @NotNull public KubernetesManifest addManifest(@NotNull String _id, @NotNull Object... _manifest)
The manifest will be applied/deleted using kubectl as needed.
addManifest in interface ICluster_id - This parameter is required._manifest - This parameter is required.@Stability(value=Experimental) @NotNull public Nodegroup addNodegroup(@NotNull String id, @Nullable NodegroupOptions options)
This method will create a new managed nodegroup and add into the capacity.
id - The ID of the nodegroup. This parameter is required.options - options for creating a new nodegroup.https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html@Stability(value=Experimental) @NotNull public Nodegroup addNodegroup(@NotNull String id)
This method will create a new managed nodegroup and add into the capacity.
id - The ID of the nodegroup. This parameter is required.https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html@Stability(value=Experimental) @NotNull public ServiceAccount addServiceAccount(@NotNull String _id, @Nullable ServiceAccountOptions _options)
addServiceAccount in interface ICluster_id - This parameter is required._options - @Stability(value=Experimental) @NotNull public ServiceAccount addServiceAccount(@NotNull String _id)
addServiceAccount in interface ICluster_id - This parameter is required.@Stability(value=Experimental) @NotNull public String getClusterArn()
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 arn:aws:eks:us-west-2666666666666;cluster / prod;
getClusterArn in interface ICluster@Stability(value=Experimental) @NotNull public String getClusterCertificateAuthorityData()
getClusterCertificateAuthorityData in interface ICluster@Stability(value=Experimental) @NotNull public String getClusterEncryptionConfigKeyArn()
getClusterEncryptionConfigKeyArn in interface ICluster@Stability(value=Experimental) @NotNull public String getClusterEndpoint()
This is the URL inside the kubeconfig file to use with kubectl
Example:
// Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826 https:
getClusterEndpoint in interface ICluster@Stability(value=Experimental) @NotNull public String getClusterName()
getClusterName in interface ICluster@Stability(value=Experimental) @NotNull public String getClusterSecurityGroupId()
getClusterSecurityGroupId in interface ICluster@Stability(value=Experimental) @NotNull public Connections getConnections()
getConnections in interface IConnectable@Stability(value=Experimental) @NotNull public IOpenIdConnectProvider getOpenIdConnectProvider()
getOpenIdConnectProvider in interface ICluster@Stability(value=Experimental) @NotNull public IRole getRole()
@Stability(value=Experimental) @NotNull public IVpc getVpc()
@Stability(value=Experimental) @Nullable public AutoScalingGroup getDefaultCapacity()
This will be undefined if the defaultCapacityType is not EC2 or
defaultCapacityType is EC2 but default capacity is set to 0.
@Stability(value=Experimental) @Nullable public Nodegroup getDefaultNodegroup()
This will be undefined if the defaultCapacityType is EC2 or
defaultCapacityType is NODEGROUP but default capacity is set to 0.
Copyright © 2020. All rights reserved.