Interface ClusterOptions

All Superinterfaces:
All Known Subinterfaces:
ClusterProps, FargateClusterProps
All Known Implementing Classes:
ClusterOptions.Jsii$Proxy, ClusterProps.Jsii$Proxy, FargateClusterProps.Jsii$Proxy

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-05-24T02:42:37.886Z") @Stability(Stable) public interface ClusterOptions extends, CommonClusterOptions
Options for EKS clusters.


 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 AlbControllerVersion albControllerVersion;
 EndpointAccess endpointAccess;
 Key key;
 KubernetesVersion kubernetesVersion;
 LayerVersion layerVersion;
 Object policy;
 Role role;
 SecurityGroup securityGroup;
 Size size;
 Subnet subnet;
 SubnetFilter subnetFilter;
 Vpc vpc;
 ClusterOptions clusterOptions = ClusterOptions.builder()
         // the properties below are optional
                 // the properties below are optional
                 "clusterHandlerEnvironmentKey", "clusterHandlerEnvironment"))
                 "kubectlEnvironmentKey", "kubectlEnvironment"))
  • Method Details

    • getAlbController

      @Stability(Stable) @Nullable default AlbControllerOptions getAlbController()
      Install the AWS Load Balancer Controller onto the cluster.

      Default: - The controller is not installed.

      See Also:
    • getAwscliLayer

      @Stability(Stable) @Nullable default ILayerVersion getAwscliLayer()
      An AWS Lambda layer that contains the aws CLI.

      The handler expects the layer to include the following executables:


      Default: - a default layer with the AWS CLI 1.x

    • getClusterHandlerEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getClusterHandlerEnvironment()
      Custom environment variables when interacting with the EKS endpoint to manage the cluster lifecycle.

      Default: - No environment variables.

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

    • getClusterLogging

      @Stability(Stable) @Nullable default List<ClusterLoggingTypes> getClusterLogging()
      The cluster log types which you want to enable.

      Default: - none

    • getCoreDnsComputeType

      @Stability(Stable) @Nullable default CoreDnsComputeType getCoreDnsComputeType()
      Controls the "" annotation in the CoreDNS configuration on your cluster to determine which compute type to use for CoreDNS.

      Default: CoreDnsComputeType.EC2 (for `FargateCluster` the default is FARGATE)

    • getEndpointAccess

      @Stability(Stable) @Nullable default EndpointAccess getEndpointAccess()
      Configure access to the Kubernetes API server endpoint..

      Default: EndpointAccess.PUBLIC_AND_PRIVATE

      See Also:
    • 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:
    • getKubectlEnvironment

      @Stability(Stable) @Nullable default Map<String,String> getKubectlEnvironment()
      Environment variables for the kubectl execution.

      Only relevant for kubectl enabled clusters.

      Default: - No environment variables.

    • getKubectlLayer

      @Stability(Stable) @Nullable default ILayerVersion getKubectlLayer()
      An AWS Lambda Layer which includes kubectl and Helm.

      This layer is used by the kubectl handler to apply manifests and install helm charts. You must pick an appropriate releases of one of the @aws-cdk/layer-kubectl-vXX packages, that works with the version of Kubernetes you have chosen. If you don't supply this value kubectl 1.20 will be used, but that version is most likely too old.

      The handler expects the layer to include the following executables:


      Default: - a default layer with Kubectl 1.20.

    • getKubectlMemory

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

      Default: Size.gibibytes(1)

    • getMastersRole

      @Stability(Stable) @Nullable default IRole getMastersRole()
      An IAM role that will be added to the system:masters Kubernetes RBAC group.

      Default: - no masters role.

      See Also:
    • getOnEventLayer

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

      This layer is used by the onEvent handler to route AWS SDK requests through a proxy.

      By default, the provider will use the layer included in the "aws-lambda-layer-node-proxy-agent" SAR application which is available in all commercial regions.

      To deploy the layer locally define it in your app as follows:

       LayerVersion layer = LayerVersion.Builder.create(this, "proxy-agent-layer")
               .code(Code.fromAsset(String.format("%s/", __dirname)))

      Default: - a layer bundled with this module.

    • getOutputMastersRoleArn

      @Stability(Stable) @Nullable default Boolean getOutputMastersRoleArn()
      Determines whether a CloudFormation output with the ARN of the "masters" IAM role will be synthesized (if mastersRole is specified).

      Default: false

    • getPlaceClusterHandlerInVpc

      @Stability(Stable) @Nullable default Boolean getPlaceClusterHandlerInVpc()
      If set to true, the cluster handler functions will be placed in the private subnets of the cluster vpc, subject to the vpcSubnets selection strategy.

      Default: false

    • getPrune

      @Stability(Stable) @Nullable default Boolean getPrune()
      Indicates whether Kubernetes resources added through addManifest() 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.

      Default: true

    • getSecretsEncryptionKey

      @Stability(Stable) @Nullable default IKey getSecretsEncryptionKey()
      KMS secret for envelope encryption for Kubernetes secrets.

      Default: - By default, Kubernetes stores all secret object data within etcd and all etcd volumes used by Amazon EKS are encrypted at the disk-level using AWS-Managed encryption keys.

    • getServiceIpv4Cidr

      @Stability(Stable) @Nullable default String getServiceIpv4Cidr()
      The CIDR block to assign Kubernetes service IP addresses from.

      Default: - Kubernetes assigns addresses from either the or CIDR blocks

      See Also:
    • builder

      @Stability(Stable) static ClusterOptions.Builder builder()
      a ClusterOptions.Builder of ClusterOptions