【发布时间】:2026-01-07 05:50:01
【问题描述】:
我想在 EKS 集群中创建具有现有节点安全组的 EKS 工作程序节点。
目前,使用以下cloudformation template,使用新的安全组创建 EKS 工作节点。
如何为我的工作程序节点引用预先存在的节点安全组?
【问题讨论】:
标签: amazon-web-services kubernetes amazon-cloudformation amazon-eks
我想在 EKS 集群中创建具有现有节点安全组的 EKS 工作程序节点。
目前,使用以下cloudformation template,使用新的安全组创建 EKS 工作节点。
如何为我的工作程序节点引用预先存在的节点安全组?
【问题讨论】:
标签: amazon-web-services kubernetes amazon-cloudformation amazon-eks
Arundathi,我将使用相同的模板来解释它。
NodeSecurityGroup 正在此模板 (#L200) 中创建。如果您想使用现有的安全组,则可以将其作为用户输入,就像ClusterControlPlaneSecurityGroup(#L136):
ClusterControlPlaneSecurityGroup:
Description: The security group of the cluster control plane.
Type: AWS::EC2::SecurityGroup::Id
然后,在需要的地方参考 (#L226)。例如:
NodeSecurityGroupFromControlPlaneIngress:
Type: AWS::EC2::SecurityGroupIngress
DependsOn: NodeSecurityGroup
Properties:
Description: Allow worker Kubelets and pods to receive communication from the cluster control plane
GroupId: !Ref NodeSecurityGroup
SourceSecurityGroupId: !Ref ClusterControlPlaneSecurityGroup
IpProtocol: tcp
FromPort: 1025
ToPort: 65535
如果您还有任何问题,请告诉我。
【讨论】: