Class Cluster
- All Implemented Interfaces:
IConstruct,IDependable,IResource,IConnectable,ICluster,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
This is a fully managed cluster of API Servers (control-plane) The user is still required to create the worker nodes.
Example:
Cluster cluster;
// option 1: use a construct
// option 1: use a construct
HelmChart.Builder.create(this, "NginxIngress")
.cluster(cluster)
.chart("nginx-ingress")
.repository("https://helm.nginx.com/stable")
.namespace("kube-system")
.build();
// or, option2: use `addChart`
cluster.addChart("NginxIngress", HelmChartOptions.builder()
.chart("nginx-ingress")
.repository("https://helm.nginx.com/stable")
.namespace("kube-system")
.build());
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.amazon.awscdk.services.eks.legacy.ICluster
ICluster.Jsii$Default, ICluster.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAutoScalingGroup(AutoScalingGroup autoScalingGroup, AutoScalingGroupOptions options) Deprecated.addCapacity(String id, CapacityOptions options) Deprecated.addChart(String id, HelmChartOptions options) Deprecated.addResource(String id, @NotNull Object... manifest) Deprecated.static IClusterfromClusterAttributes(Construct scope, String id, ClusterAttributes attrs) Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.getRole()Deprecated.getVpc()Deprecated.Methods inherited from class software.amazon.awscdk.core.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isResourceMethods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validateMethods inherited from class software.constructs.Construct
toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awscdk.core.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.core.IResource
applyRemovalPolicy, getEnv, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
Cluster
protected Cluster(software.amazon.jsii.JsiiObjectRef objRef) Deprecated. -
Cluster
protected Cluster(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) Deprecated. -
Cluster
@Stability(Deprecated) @Deprecated public Cluster(@NotNull Construct scope, @NotNull String id, @Nullable ClusterProps props) Deprecated.(deprecated) Initiates an EKS Cluster with the supplied arguments.- Parameters:
scope- a Construct, most likely a cdk.Stack created. This parameter is required.id- This parameter is required.props- properties in the IClusterProps interface.
-
Cluster
Deprecated.(deprecated) Initiates an EKS Cluster with the supplied arguments.- Parameters:
scope- a Construct, most likely a cdk.Stack created. This parameter is required.id- This parameter is required.
-
-
Method Details
-
fromClusterAttributes
@Stability(Deprecated) @Deprecated @NotNull public static ICluster fromClusterAttributes(@NotNull Construct scope, @NotNull String id, @NotNull ClusterAttributes attrs) Deprecated.(deprecated) Import an existing cluster.- Parameters:
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.
-
addAutoScalingGroup
@Stability(Deprecated) @Deprecated public void addAutoScalingGroup(@NotNull AutoScalingGroup autoScalingGroup, @NotNull AutoScalingGroupOptions options) Deprecated.(deprecated) Add compute capacity to this EKS cluster in the form of an AutoScalingGroup.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=Ec2Spotand tainted withPreferNoSchedule. 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
addCapacityif possible.- Parameters:
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.- See Also:
-
addCapacity
@Stability(Deprecated) @Deprecated @NotNull public AutoScalingGroup addCapacity(@NotNull String id, @NotNull CapacityOptions options) Deprecated.(deprecated) Add nodes to this EKS cluster.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=Ec2Spotand tainted withPreferNoSchedule. If kubectl is enabled, the spot interrupt handler daemon will be installed on all spot instances to handle EC2 Spot Instance Termination Notices.- Parameters:
id- This parameter is required.options- This parameter is required.
-
addChart
@Stability(Deprecated) @Deprecated @NotNull public HelmChart addChart(@NotNull String id, @NotNull HelmChartOptions options) Deprecated.(deprecated) Defines a Helm chart in this cluster.- Parameters:
id- logical id of this chart. This parameter is required.options- options of this chart. This parameter is required.- Returns:
- a
HelmChartobject
-
addResource
@Stability(Deprecated) @Deprecated @NotNull public KubernetesResource addResource(@NotNull String id, @NotNull @NotNull Object... manifest) Deprecated.(deprecated) Defines a Kubernetes resource in this cluster.The manifest will be applied/deleted using kubectl as needed.
- Parameters:
id- logical id of this manifest. This parameter is required.manifest- a list of Kubernetes resource specifications. This parameter is required.- Returns:
- a
KubernetesResourceobject.
-
getAwsAuth
Deprecated.(deprecated) Lazily creates the AwsAuth resource, which manages AWS authentication mapping. -
getClusterArn
Deprecated.(deprecated) The AWS generated ARN for the Cluster resource.For example,
arn:aws:eks:us-west-2:666666666666:cluster/prod- Specified by:
getClusterArnin interfaceICluster
-
getClusterCertificateAuthorityData
Deprecated.(deprecated) The certificate-authority-data for your cluster.- Specified by:
getClusterCertificateAuthorityDatain interfaceICluster
-
getClusterEndpoint
Deprecated.(deprecated) The endpoint URL for the Cluster.This is the URL inside the kubeconfig file to use with kubectl
For example,
https://5E1D0CEXAMPLEA591B746AFC5AB30262---yl4---us-west-2---eks.amazonaws.com.rproxy.govskope.ca- Specified by:
getClusterEndpointin interfaceICluster
-
getClusterName
Deprecated.(deprecated) The Name of the created EKS Cluster.- Specified by:
getClusterNamein interfaceICluster
-
getConnections
Deprecated.(deprecated) Manages connection rules (Security Group Rules) for the cluster.- Specified by:
getConnectionsin interfaceIConnectable
-
getKubectlEnabled
Deprecated.(deprecated) Indicates ifkubectlrelated operations can be performed on this cluster. -
getRole
Deprecated.(deprecated) IAM role assumed by the EKS Control Plane. -
getVpc
Deprecated.(deprecated) The VPC in which this Cluster was created. -
getDefaultCapacity
Deprecated.(deprecated) The auto scaling group that hosts the default capacity for this cluster.This will be
undefinedif the default capacity is set to 0.
-