proud-pizza-80589
01/31/2023, 5:51 PM// Create a new VPC
const eksVpc = new Vpc('eks-vpc', {
enableDnsHostnames: true,
cidrBlock: '10.0.0.0/16',
});
// Create the EKS cluster
this.cluster = new Cluster(name, {
// Put the cluster in the new VPC created earlier
vpcId: eksVpc.vpcId,
// Public subnets will be used for load balancers
publicSubnetIds: eksVpc.publicSubnetIds,
// Private subnets will be used for cluster nodes
privateSubnetIds: eksVpc.privateSubnetIds,
// Change configuration values to change any of the following settings
instanceType: 't3.large',
desiredCapacity: 3,
minSize: 3,
maxSize: name.endsWith('-staging') ? 5 : 50,
// Do not give the worker nodes public IP addresses
nodeAssociatePublicIpAddress: false,
});
narrow-finland-76022
01/31/2023, 5:57 PMproud-pizza-80589
01/31/2023, 5:58 PMnarrow-finland-76022
01/31/2023, 5:59 PMproud-pizza-80589
01/31/2023, 5:59 PM"@pulumi/aws": "5.28.0",
"@pulumi/awsx": "1.0.1",
"@pulumi/eks": "1.0.1",
narrow-finland-76022
01/31/2023, 6:01 PMproud-pizza-80589
01/31/2023, 7:00 PMnarrow-finland-76022
01/31/2023, 8:35 PM