Attach cluster security group to Self-managed Nodes #24737
-
Tracking issue: #10884 In the above issue, I saw this code snippet that utilized CDK. I am wondering how does CDK generate CFN template (?) that attached the Cluster securityGroup to EKS Self-managed Nodes
I am wondering what rule does this Also I am wondering from CDK point of view, how does CDK retrieve the |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is being imported, so it could have any valid security group rule.
The CDK isn't actually making any lookups - importing the security group is just a way to be able to pass data around. |
Beta Was this translation helpful? Give feedback.
-
If you look at the eks.Cluster source code, when you create the cluster, you get the clusterSecurityGroupId which is an attribute of the cluster resource returned from CFN. And when you |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
This is being imported, so it could have any valid security group rule.
The CDK isn't actually making any lookups - importing the security group is just a way to be able to pass data around.
addSecurityGroup
requires anISecurityGroup
, so either you need to create a new L2 SecurityGroup, or import one. When importing a SecurityGroup and passing it toaddSecurityGroup
, it will simply take the arn that it built based off the securityGroupId provided and specify it somewhere in the template. See more info here on importing resources, and let me know if …