Interface ICluster

All Superinterfaces:
IConnectable, IConstruct, software.constructs.IConstruct, IDependable, 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.84.0 (build 5404dcf)", date="2023-06-19T16:30:46.607Z") @Stability(Stable) public interface ICluster extends software.amazon.jsii.JsiiSerializable, IResource, IConnectable
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.
    • getClusterHandlerSecurityGroup

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

    • getKubectlEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getKubectlEnvironment()
      Custom environment variables when running kubectl against this cluster.
    • getKubectlLambdaRole

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

    • getKubectlLayer

      @Stability(Stable) @Nullable default ILayerVersion getKubectlLayer()
      An AWS Lambda layer that includes kubectl, helm and the aws CLI.

      If not defined, a default layer will be used.

    • getKubectlMemory

      @Stability(Stable) @Nullable default Size getKubectlMemory()
      Amount of memory to allocate to the provider's lambda function.
    • getKubectlPrivateSubnets

      @Stability(Stable) @Nullable default List<ISubnet> getKubectlPrivateSubnets()
      Subnets to host the kubectl compute resources.

      If this is undefined, the k8s endpoint is expected to be accessible publicly.

    • getKubectlProvider

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

      If not defined, a default provider will be used

    • getKubectlRole

      @Stability(Stable) @Nullable default IRole getKubectlRole()
      An IAM role that can perform kubectl operations against this cluster.

      The role should be mapped to the system:masters Kubernetes RBAC role.

    • getKubectlSecurityGroup

      @Stability(Stable) @Nullable default ISecurityGroup getKubectlSecurityGroup()
      A security group to use for kubectl execution.

      If this is undefined, the k8s endpoint is expected to be accessible publicly.

    • getOnEventLayer

      @Stability(Stable) @Nullable default ILayerVersion getOnEventLayer()
      An AWS Lambda layer that includes the NPM dependency proxy-agent.

      If not defined, a default layer will be used.

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

      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.

      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: