aws-cdk-lib.aws_eks.IpFamily

enum IpFamily

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

EKS cluster IP family.

Example

declare const vpc: ec2.Vpc;

// make an ipv6 cidr
const ipv6cidr = new ec2.CfnVPCCidrBlock(this, 'CIDR6', {
  vpcId: vpc.vpcId,
  amazonProvidedIpv6CidrBlock: true,
});

// connect the ipv6 cidr to all vpc subnets
let subnetcount = 0;
let subnets = [...vpc.publicSubnets, ...vpc.privateSubnets];
for ( let subnet of subnets) {
  // Wait for the ipv6 cidr to complete
  subnet.node.addDependency(ipv6cidr);
  this._associate_subnet_with_v6_cidr(subnetcount, subnet);
  subnetcount++;
}

const cluster = new eks.Cluster(this, 'hello-eks', {
  vpc: vpc,
  ipFamily: eks.IpFamily.IP_V6,
  vpcSubnets: [{ subnets: [...vpc.publicSubnets] }],
});

Members

NameDescription
IP_V4Use IPv4 for pods and services in your cluster.
IP_V6Use IPv6 for pods and services in your cluster.

IP_V4

Use IPv4 for pods and services in your cluster.


IP_V6

Use IPv6 for pods and services in your cluster.