rhythmic-whale-48997
03/29/2022, 1:46 PMbillowy-army-68599
rhythmic-whale-48997
03/29/2022, 1:53 PMconst example-ng = new eks.NodeGroup("example-ng", {
cluster: cluster,
instanceType: "t2.medium",
desiredCapacity: 1,
minSize: 1,
maxSize: 3,
instanceProfile: instanceProfile,
keyName: deployer.keyName,
nodeUserData: cloudConfig.then((c) => c.rendered)
});
And my cluster has privateSubnetIds
set to vpc.privateSubnetIds
pulumi-eks source code should default set subnet ids from the cluster.privateSubnetIds
billowy-army-68599
pulumi-eks source code should default set subnet ids from the cluster.privateSubnetIdsAre you saying you expected the nodes to just automatically be in the right subnet?
rhythmic-whale-48997
03/29/2022, 2:12 PMAre you saying you expected the nodes to just automatically be in the right subnet?No, I'm saying that from pulumi-eks source code, NodeGroup should inherit subnet ids from the cluster https://github.com/pulumi/pulumi-eks/blob/d599a1b1f3650dba4c3dc4f560080e95ce6fb5b1/nodejs/eks/nodegroup.ts#L562 Also, if I set subnet ids, like this, I would expect that my EC2 instances have only private IPv4 address, but they get public IPv4 address also
const example-ng = new eks.NodeGroup("example-ng", {
cluster: cluster,
instanceType: "t2.medium",
desiredCapacity: 1,
minSize: 1,
maxSize: 3,
instanceProfile: instanceProfile,
keyName: deployer.keyName,
nodeUserData: cloudConfig.then((c) => c.rendered),
nodeSubnetIds: vpc.privateSubnetIds
});
EC2 from NodeGroup with public address.const mng = eks.createManagedNodeGroup("example-managed-ng", {
cluster: cluster,
nodeGroupName: "aws-managed-ng",
nodeRoleArn: role.arn,
remoteAccess: {
ec2SshKey: deployer.keyName
},
scalingConfig: {
desiredSize: 1,
minSize: 1,
maxSize: 3,
},
subnetIds: vpc.privateSubnetIds,
diskSize: 50,
instanceTypes: ["c4.4xlarge"],
labels: {"ondemand": "true"},
}, cluster);
billowy-army-68599
rhythmic-whale-48997
03/30/2022, 12:58 PMbillowy-army-68599
rhythmic-whale-48997
04/12/2022, 1:13 PMbillowy-army-68599
polite-napkin-90098
04/12/2022, 2:32 PMrhythmic-whale-48997
04/12/2022, 2:45 PM