aws-cdk-lib.aws_eks.CfnClusterProps

interface CfnClusterProps

LanguageType name
.NETAmazon.CDK.AWS.EKS.CfnClusterProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awseks#CfnClusterProps
Javasoftware.amazon.awscdk.services.eks.CfnClusterProps
Pythonaws_cdk.aws_eks.CfnClusterProps
TypeScript aws-cdk-lib » aws_eks » CfnClusterProps

Properties for defining a CfnCluster.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_eks as eks } from 'aws-cdk-lib';
const cfnClusterProps: eks.CfnClusterProps = {
  resourcesVpcConfig: {
    subnetIds: ['subnetIds'],

    // the properties below are optional
    endpointPrivateAccess: false,
    endpointPublicAccess: false,
    publicAccessCidrs: ['publicAccessCidrs'],
    securityGroupIds: ['securityGroupIds'],
  },
  roleArn: 'roleArn',

  // the properties below are optional
  encryptionConfig: [{
    provider: {
      keyArn: 'keyArn',
    },
    resources: ['resources'],
  }],
  kubernetesNetworkConfig: {
    ipFamily: 'ipFamily',
    serviceIpv4Cidr: 'serviceIpv4Cidr',
    serviceIpv6Cidr: 'serviceIpv6Cidr',
  },
  logging: {
    clusterLogging: {
      enabledTypes: [{
        type: 'type',
      }],
    },
  },
  name: 'name',
  outpostConfig: {
    controlPlaneInstanceType: 'controlPlaneInstanceType',
    outpostArns: ['outpostArns'],

    // the properties below are optional
    controlPlanePlacement: {
      groupName: 'groupName',
    },
  },
  tags: [{
    key: 'key',
    value: 'value',
  }],
  version: 'version',
};

Properties

NameTypeDescription
resourcesVpcConfigIResolvable | ResourcesVpcConfigPropertyThe VPC configuration that's used by the cluster control plane.
roleArnstringThe Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
encryptionConfig?IResolvable | IResolvable | EncryptionConfigProperty[]The encryption configuration for the cluster.
kubernetesNetworkConfig?IResolvable | KubernetesNetworkConfigPropertyThe Kubernetes network configuration for the cluster.
logging?IResolvable | LoggingPropertyThe logging configuration for your cluster.
name?stringThe unique name to give to your cluster.
outpostConfig?IResolvable | OutpostConfigPropertyAn object representing the configuration of your local Amazon EKS cluster on an AWS Outpost.
tags?CfnTag[]The metadata that you apply to the cluster to assist with categorization and organization.
version?stringThe desired Kubernetes version for your cluster.

resourcesVpcConfig

Type: IResolvable | ResourcesVpcConfigProperty

The VPC configuration that's used by the cluster control plane.

Amazon EKS VPC resources have specific requirements to work properly with Kubernetes. For more information, see Cluster VPC Considerations and Cluster Security Group Considerations in the Amazon EKS User Guide . You must specify at least two subnets. You can specify up to five security groups, but we recommend that you use a dedicated security group for your cluster control plane.

Updates require replacement of the SecurityGroupIds and SubnetIds sub-properties.


roleArn

Type: string

The Amazon Resource Name (ARN) of the IAM role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.

For more information, see Amazon EKS Service IAM Role in the Amazon EKS User Guide .


encryptionConfig?

Type: IResolvable | IResolvable | EncryptionConfigProperty[] (optional)

The encryption configuration for the cluster.


kubernetesNetworkConfig?

Type: IResolvable | KubernetesNetworkConfigProperty (optional)

The Kubernetes network configuration for the cluster.


logging?

Type: IResolvable | LoggingProperty (optional)

The logging configuration for your cluster.


name?

Type: string (optional)

The unique name to give to your cluster.


outpostConfig?

Type: IResolvable | OutpostConfigProperty (optional)

An object representing the configuration of your local Amazon EKS cluster on an AWS Outpost.

This object isn't available for clusters on the AWS cloud.


tags?

Type: CfnTag[] (optional)

The metadata that you apply to the cluster to assist with categorization and organization.

Each tag consists of a key and an optional value, both of which you define. Cluster tags don't propagate to any other resources associated with the cluster.

You must have the eks:TagResource and eks:UntagResource permissions for your IAM principal to manage the AWS CloudFormation stack. If you don't have these permissions, there might be unexpected behavior with stack-level tags propagating to the resource during resource creation and update.


version?

Type: string (optional)

The desired Kubernetes version for your cluster.

If you don't specify a value here, the default version available in Amazon EKS is used.

The default version might not be the latest version available.