@Generated(value="jsii-pacmak/1.74.0 (build 6d08790)", date="2023-03-22T19:35:49.056Z") public interface ICluster extends IResource, IConnectable
Modifier and Type | Interface and Description |
---|---|
static interface |
ICluster.Jsii$Default
Internal default implementation for
ICluster . |
static class |
ICluster.Jsii$Proxy
A proxy class which represents a concrete javascript instance of this type.
|
Modifier and Type | Method and Description |
---|---|
KubernetesManifest |
addCdk8sChart(java.lang.String id,
software.constructs.Construct chart)
Defines a CDK8s chart in this cluster.
|
KubernetesManifest |
addCdk8sChart(java.lang.String id,
software.constructs.Construct chart,
KubernetesManifestOptions options)
Defines a CDK8s chart in this cluster.
|
HelmChart |
addHelmChart(java.lang.String id,
HelmChartOptions options)
Defines a Helm chart in this cluster.
|
KubernetesManifest |
addManifest(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object>... manifest)
Defines a Kubernetes resource in this cluster.
|
ServiceAccount |
addServiceAccount(java.lang.String id)
Creates a new service account with corresponding IAM Role (IRSA).
|
ServiceAccount |
addServiceAccount(java.lang.String id,
ServiceAccountOptions options)
Creates a new service account with corresponding IAM Role (IRSA).
|
void |
connectAutoScalingGroupCapacity(AutoScalingGroup autoScalingGroup,
AutoScalingGroupOptions options)
Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.
|
java.lang.String |
getClusterArn()
The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.
|
java.lang.String |
getClusterCertificateAuthorityData()
The certificate-authority-data for your cluster.
|
java.lang.String |
getClusterEncryptionConfigKeyArn()
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
|
java.lang.String |
getClusterEndpoint()
The API Server endpoint URL.
|
default ISecurityGroup |
getClusterHandlerSecurityGroup()
A security group to associate with the Cluster Handler's Lambdas.
|
java.lang.String |
getClusterName()
The physical name of the Cluster.
|
ISecurityGroup |
getClusterSecurityGroup()
The cluster security group that was created by Amazon EKS for the cluster.
|
java.lang.String |
getClusterSecurityGroupId()
The id of the cluster security group that was created by Amazon EKS for the cluster.
|
default java.util.Map<java.lang.String,java.lang.String> |
getKubectlEnvironment()
Custom environment variables when running `kubectl` against this cluster.
|
default IRole |
getKubectlLambdaRole()
An IAM role that can perform kubectl operations against this cluster.
|
default ILayerVersion |
getKubectlLayer()
An AWS Lambda layer that includes `kubectl`, `helm` and the `aws` CLI.
|
default Size |
getKubectlMemory()
Amount of memory to allocate to the provider's lambda function.
|
default java.util.List<ISubnet> |
getKubectlPrivateSubnets()
Subnets to host the `kubectl` compute resources.
|
default IKubectlProvider |
getKubectlProvider()
Kubectl Provider for issuing kubectl commands against it.
|
default IRole |
getKubectlRole()
An IAM role that can perform kubectl operations against this cluster.
|
default ISecurityGroup |
getKubectlSecurityGroup()
A security group to use for `kubectl` execution.
|
default ILayerVersion |
getOnEventLayer()
An AWS Lambda layer that includes the NPM dependency `proxy-agent`.
|
IOpenIdConnectProvider |
getOpenIdConnectProvider()
The Open ID Connect Provider of the cluster used to configure Service Accounts.
|
java.lang.Boolean |
getPrune()
Indicates whether Kubernetes resources can be automatically pruned.
|
IVpc |
getVpc()
The VPC in which this Cluster was created.
|
applyRemovalPolicy, getEnv, getStack
getNode
getConnections
java.lang.String getClusterArn()
java.lang.String getClusterCertificateAuthorityData()
java.lang.String getClusterEncryptionConfigKeyArn()
java.lang.String getClusterEndpoint()
java.lang.String getClusterName()
ISecurityGroup getClusterSecurityGroup()
java.lang.String getClusterSecurityGroupId()
IOpenIdConnectProvider getOpenIdConnectProvider()
java.lang.Boolean getPrune()
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.
IVpc getVpc()
default ISecurityGroup getClusterHandlerSecurityGroup()
The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
Requires placeClusterHandlerInVpc
to be set to true.
Default: - No security group.
default java.util.Map<java.lang.String,java.lang.String> getKubectlEnvironment()
default IRole getKubectlLambdaRole()
The role should be mapped to the system:masters
Kubernetes RBAC role.
This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
default ILayerVersion getKubectlLayer()
If not defined, a default layer will be used.
default Size getKubectlMemory()
default java.util.List<ISubnet> getKubectlPrivateSubnets()
If this is undefined, the k8s endpoint is expected to be accessible publicly.
default IKubectlProvider getKubectlProvider()
If not defined, a default provider will be used
default IRole getKubectlRole()
The role should be mapped to the system:masters
Kubernetes RBAC role.
default ISecurityGroup getKubectlSecurityGroup()
If this is undefined, the k8s endpoint is expected to be accessible publicly.
default ILayerVersion getOnEventLayer()
If not defined, a default layer will be used.
KubernetesManifest addCdk8sChart(java.lang.String id, software.constructs.Construct chart, KubernetesManifestOptions options)
id
- logical id of this chart. This parameter is required.chart
- the cdk8s chart. This parameter is required.options
- KubernetesManifest addCdk8sChart(java.lang.String id, software.constructs.Construct chart)
id
- logical id of this chart. This parameter is required.chart
- the cdk8s chart. This parameter is required.HelmChart addHelmChart(java.lang.String id, HelmChartOptions options)
id
- logical id of this chart. This parameter is required.options
- options of this chart. This parameter is required.KubernetesManifest addManifest(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object>... manifest)
The manifest will be applied/deleted using kubectl as needed.
id
- logical id of this manifest. This parameter is required.manifest
- a list of Kubernetes resource specifications. This parameter is required.ServiceAccount addServiceAccount(java.lang.String id, ServiceAccountOptions options)
id
- logical id of service account. This parameter is required.options
- service account options.ServiceAccount addServiceAccount(java.lang.String id)
id
- logical id of service account. This parameter is required.void connectAutoScalingGroupCapacity(AutoScalingGroup autoScalingGroup, 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 addAutoScalingGroupCapacity
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.