Interface ICluster

All Superinterfaces:
IClusterRef, IConnectable, software.constructs.IConstruct, software.constructs.IDependable, IEnvironmentAware, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ICluster.Jsii$Default
All Known Implementing Classes:
Cluster, FargateCluster, ICluster.Jsii$Proxy

@Generated(value="jsii-pacmak/1.126.0 (build 206d44b)", date="2026-02-23T18:58:18.921Z") @Stability(Stable) public interface ICluster extends software.amazon.jsii.JsiiSerializable, IResource, IConnectable, IClusterRef
An EKS cluster.
  • Method Details

    • getClusterArn

      @Stability(Stable) @NotNull String getClusterArn()
      The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.
    • getClusterCertificateAuthorityData

      @Stability(Stable) @NotNull String getClusterCertificateAuthorityData()
      The certificate-authority-data for your cluster.
    • getClusterEncryptionConfigKeyArn

      @Stability(Stable) @NotNull String getClusterEncryptionConfigKeyArn()
      Amazon Resource Name (ARN) or alias of the customer master key (CMK).
    • getClusterEndpoint

      @Stability(Stable) @NotNull String getClusterEndpoint()
      The API Server endpoint URL.
    • getClusterName

      @Stability(Stable) @NotNull String getClusterName()
      The physical name of the Cluster.
    • getClusterSecurityGroup

      @Stability(Stable) @NotNull ISecurityGroup getClusterSecurityGroup()
      The cluster security group that was created by Amazon EKS for the cluster.
    • getClusterSecurityGroupId

      @Stability(Stable) @NotNull String getClusterSecurityGroupId()
      The id of the cluster security group that was created by Amazon EKS for the cluster.
    • getOpenIdConnectProvider

      @Stability(Stable) @NotNull IOpenIdConnectProvider getOpenIdConnectProvider()
      The Open ID Connect Provider of the cluster used to configure Service Accounts.
    • getPrune

      @Stability(Stable) @NotNull Boolean 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

      @Stability(Stable) @NotNull IVpc getVpc()
      The VPC in which this Cluster was created.
    • getEksPodIdentityAgent

      @Stability(Stable) @Nullable default IAddon getEksPodIdentityAgent()
      The EKS Pod Identity Agent addon for the EKS cluster.

      The EKS Pod Identity Agent is responsible for managing the temporary credentials used by pods in the cluster to access AWS resources. It runs as a DaemonSet on each node and provides the necessary credentials to the pods based on their associated service account.

      This property returns the CfnAddon resource representing the EKS Pod Identity Agent addon. If the addon has not been created yet, it will be created and returned.

    • getIpFamily

      @Stability(Stable) @Nullable default IpFamily getIpFamily()
      Specify which IP family is used to assign Kubernetes pod and service IP addresses.

      Default: - IpFamily.IP_V4

      See Also:
    • getKubectlProvider

      @Stability(Stable) @Nullable default IKubectlProvider getKubectlProvider()
      Kubectl Provider for issuing kubectl commands against it.

      If not defined, a default provider will be used

    • getKubectlProviderOptions

      @Stability(Stable) @Nullable default KubectlProviderOptions getKubectlProviderOptions()
      Options for creating the kubectl provider - a lambda function that executes kubectl and helm against the cluster.

      If defined, kubectlLayer is a required property.

      Default: - kubectl provider will not be created

    • addCdk8sChart

      @Stability(Stable) @NotNull KubernetesManifest addCdk8sChart(@NotNull String id, @NotNull software.constructs.Construct chart, @Nullable KubernetesManifestOptions options)
      Defines a CDK8s chart in this cluster.

      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.
    • addCdk8sChart

      @Stability(Stable) @NotNull KubernetesManifest addCdk8sChart(@NotNull String id, @NotNull software.constructs.Construct chart)
      Defines a CDK8s chart in this cluster.

      Parameters:
      id - logical id of this chart. This parameter is required.
      chart - the cdk8s chart. This parameter is required.
      Returns:
      a KubernetesManifest construct representing the chart.
    • addHelmChart

      @Stability(Stable) @NotNull HelmChart addHelmChart(@NotNull String id, @NotNull HelmChartOptions options)
      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 HelmChart construct
    • addManifest

      @Stability(Stable) @NotNull KubernetesManifest addManifest(@NotNull String id, @NotNull Map<String,Object>... manifest)
      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 KubernetesManifest object.
    • addServiceAccount

      @Stability(Stable) @NotNull ServiceAccount addServiceAccount(@NotNull String id, @Nullable ServiceAccountOptions options)
      Creates a new service account with corresponding IAM Role (IRSA).

      Parameters:
      id - logical id of service account. This parameter is required.
      options - service account options.
    • addServiceAccount

      @Stability(Stable) @NotNull ServiceAccount addServiceAccount(@NotNull String id)
      Creates a new service account with corresponding IAM Role (IRSA).

      Parameters:
      id - logical id of service account. This parameter is required.
    • connectAutoScalingGroupCapacity

      @Stability(Stable) 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.

      Prefer to use addAutoScalingGroupCapacity if 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: