Interface ICluster.Jsii$Default
- All Superinterfaces:
ICluster
,IConnectable
,IConnectable.Jsii$Default
,IConstruct
,software.constructs.IConstruct
,IConstruct.Jsii$Default
,software.constructs.IConstruct.Jsii$Default
,IDependable
,IDependable.Jsii$Default
,IResource
,IResource.Jsii$Default
,software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ICluster.Jsii$Proxy
- Enclosing interface:
- ICluster
ICluster
.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.eks.ICluster
ICluster.Jsii$Default, ICluster.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.ec2.IConnectable
IConnectable.Jsii$Default, IConnectable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default, IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IDependable
IDependable.Jsii$Default, IDependable.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IResource
IResource.Jsii$Default, IResource.Jsii$Proxy
-
Method Summary
Modifier and TypeMethodDescriptiondefault KubernetesManifest
addCdk8sChart
(String id, software.constructs.Construct chart, KubernetesManifestOptions options) Defines a CDK8s chart in this cluster.default HelmChart
addHelmChart
(String id, HelmChartOptions options) Defines a Helm chart in this cluster.default KubernetesManifest
addManifest
(String id, @NotNull Map<String, Object>... manifest) Defines a Kubernetes resource in this cluster.default ServiceAccount
addServiceAccount
(String id, ServiceAccountOptions options) Creates a new service account with corresponding IAM Role (IRSA).default void
applyRemovalPolicy
(RemovalPolicy policy) Apply the given removal policy to this resource.default void
connectAutoScalingGroupCapacity
(AutoScalingGroup autoScalingGroup, AutoScalingGroupOptions options) Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.default String
The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.default String
The certificate-authority-data for your cluster.default String
Amazon Resource Name (ARN) or alias of the customer master key (CMK).default String
The API Server endpoint URL.default ISecurityGroup
A security group to associate with the Cluster Handler's Lambdas.default String
The physical name of the Cluster.default ISecurityGroup
The cluster security group that was created by Amazon EKS for the cluster.default String
The id of the cluster security group that was created by Amazon EKS for the cluster.default Connections
The network connections associated with this resource.default ResourceEnvironment
getEnv()
The environment this resource belongs to.Custom environment variables when runningkubectl
against this cluster.default IRole
An IAM role that can perform kubectl operations against this cluster.default ILayerVersion
An AWS Lambda layer that includeskubectl
,helm
and theaws
CLI.default Size
Amount of memory to allocate to the provider's lambda function.Subnets to host thekubectl
compute resources.default IKubectlProvider
Kubectl Provider for issuing kubectl commands against it.default IRole
An IAM role that can perform kubectl operations against this cluster.default ISecurityGroup
A security group to use forkubectl
execution.default ConstructNode
getNode()
The construct tree node for this construct.default ILayerVersion
An AWS Lambda layer that includes the NPM dependencyproxy-agent
.default IOpenIdConnectProvider
The Open ID Connect Provider of the cluster used to configure Service Accounts.default Boolean
getPrune()
Indicates whether Kubernetes resources can be automatically pruned.default Stack
getStack()
The stack in which this resource is defined.default IVpc
getVpc()
The VPC in which this Cluster was created.Methods inherited from interface software.amazon.awscdk.services.eks.ICluster
addCdk8sChart, addServiceAccount
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getNode
The construct tree node for this construct.- Specified by:
getNode
in interfaceIConstruct
- Specified by:
getNode
in interfaceIConstruct.Jsii$Default
- Specified by:
getNode
in interfaceIResource.Jsii$Default
-
getEnv
The environment this resource belongs to.For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
- Specified by:
getEnv
in interfaceIResource
- Specified by:
getEnv
in interfaceIResource.Jsii$Default
-
getStack
The stack in which this resource is defined.- Specified by:
getStack
in interfaceIResource
- Specified by:
getStack
in interfaceIResource.Jsii$Default
-
getConnections
The network connections associated with this resource.- Specified by:
getConnections
in interfaceIConnectable
- Specified by:
getConnections
in interfaceIConnectable.Jsii$Default
-
getClusterArn
The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.- Specified by:
getClusterArn
in interfaceICluster
-
getClusterCertificateAuthorityData
The certificate-authority-data for your cluster.- Specified by:
getClusterCertificateAuthorityData
in interfaceICluster
-
getClusterEncryptionConfigKeyArn
Amazon Resource Name (ARN) or alias of the customer master key (CMK).- Specified by:
getClusterEncryptionConfigKeyArn
in interfaceICluster
-
getClusterEndpoint
The API Server endpoint URL.- Specified by:
getClusterEndpoint
in interfaceICluster
-
getClusterName
The physical name of the Cluster.- Specified by:
getClusterName
in interfaceICluster
-
getClusterSecurityGroup
The cluster security group that was created by Amazon EKS for the cluster.- Specified by:
getClusterSecurityGroup
in interfaceICluster
-
getClusterSecurityGroupId
The id of the cluster security group that was created by Amazon EKS for the cluster.- Specified by:
getClusterSecurityGroupId
in interfaceICluster
-
getOpenIdConnectProvider
The Open ID Connect Provider of the cluster used to configure Service Accounts.- Specified by:
getOpenIdConnectProvider
in interfaceICluster
-
getPrune
Indicates whether Kubernetes resources can be automatically pruned.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. -
getVpc
The VPC in which this Cluster was created. -
getClusterHandlerSecurityGroup
A security group to associate with the Cluster Handler's Lambdas.The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
Requires
placeClusterHandlerInVpc
to be set to true.Default: - No security group.
- Specified by:
getClusterHandlerSecurityGroup
in interfaceICluster
-
getKubectlEnvironment
Custom environment variables when runningkubectl
against this cluster.- Specified by:
getKubectlEnvironment
in interfaceICluster
-
getKubectlLambdaRole
An IAM role that can perform kubectl operations against this cluster.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.
- Specified by:
getKubectlLambdaRole
in interfaceICluster
-
getKubectlLayer
An AWS Lambda layer that includeskubectl
,helm
and theaws
CLI.If not defined, a default layer will be used.
- Specified by:
getKubectlLayer
in interfaceICluster
-
getKubectlMemory
Amount of memory to allocate to the provider's lambda function.- Specified by:
getKubectlMemory
in interfaceICluster
-
getKubectlPrivateSubnets
Subnets to host thekubectl
compute resources.If this is undefined, the k8s endpoint is expected to be accessible publicly.
- Specified by:
getKubectlPrivateSubnets
in interfaceICluster
-
getKubectlProvider
Kubectl Provider for issuing kubectl commands against it.If not defined, a default provider will be used
- Specified by:
getKubectlProvider
in interfaceICluster
-
getKubectlRole
An IAM role that can perform kubectl operations against this cluster.The role should be mapped to the
system:masters
Kubernetes RBAC role.- Specified by:
getKubectlRole
in interfaceICluster
-
getKubectlSecurityGroup
A security group to use forkubectl
execution.If this is undefined, the k8s endpoint is expected to be accessible publicly.
- Specified by:
getKubectlSecurityGroup
in interfaceICluster
-
getOnEventLayer
An AWS Lambda layer that includes the NPM dependencyproxy-agent
.If not defined, a default layer will be used.
- Specified by:
getOnEventLayer
in interfaceICluster
-
applyRemovalPolicy
Apply the given removal policy to this resource.The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (
RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).- Specified by:
applyRemovalPolicy
in interfaceIResource
- Specified by:
applyRemovalPolicy
in interfaceIResource.Jsii$Default
- Parameters:
policy
- This parameter is required.
-
addCdk8sChart
@Stability(Stable) @NotNull default KubernetesManifest addCdk8sChart(@NotNull String id, @NotNull software.constructs.Construct chart, @Nullable KubernetesManifestOptions options) Defines a CDK8s chart in this cluster.- Specified by:
addCdk8sChart
in interfaceICluster
- Parameters:
id
- logical id of this chart. This parameter is required.chart
- the cdk8s chart. This parameter is required.options
-- Returns:
- a
KubernetesManifest
construct representing the chart.
-
addHelmChart
@Stability(Stable) @NotNull default HelmChart addHelmChart(@NotNull String id, @NotNull HelmChartOptions options) Defines a Helm chart in this cluster.- Specified by:
addHelmChart
in interfaceICluster
- Parameters:
id
- logical id of this chart. This parameter is required.options
- options of this chart. This parameter is required.- Returns:
- a
HelmChart
construct
-
addManifest
@Stability(Stable) @NotNull default KubernetesManifest addManifest(@NotNull String id, @NotNull @NotNull Map<String, Object>... manifest) Defines a Kubernetes resource in this cluster.The manifest will be applied/deleted using kubectl as needed.
- Specified by:
addManifest
in interfaceICluster
- Parameters:
id
- logical id of this manifest. This parameter is required.manifest
- a list of Kubernetes resource specifications. This parameter is required.- Returns:
- a
KubernetesManifest
object.
-
addServiceAccount
@Stability(Stable) @NotNull default ServiceAccount addServiceAccount(@NotNull String id, @Nullable ServiceAccountOptions options) Creates a new service account with corresponding IAM Role (IRSA).- Specified by:
addServiceAccount
in interfaceICluster
- Parameters:
id
- logical id of service account. This parameter is required.options
- service account options.
-
connectAutoScalingGroupCapacity
@Stability(Stable) default void connectAutoScalingGroupCapacity(@NotNull AutoScalingGroup autoScalingGroup, @NotNull AutoScalingGroupOptions options) Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.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 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
addAutoScalingGroupCapacity
if possible.- Specified by:
connectAutoScalingGroupCapacity
in interfaceICluster
- 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:
-