aws-cdk-lib.aws_eks.IpFamily
enum IpFamily
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.EKS.IpFamily |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awseks#IpFamily |
![]() | software.amazon.awscdk.services.eks.IpFamily |
![]() | aws_cdk.aws_eks.IpFamily |
![]() | 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
Name | Description |
---|---|
IP_V4 | Use IPv4 for pods and services in your cluster. |
IP_V6 | Use 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.