[英]Cannot update EKS NodeGroup because of aws-auth ConfigMap issues
我们正在使用 AWS 的 EKS 运行多个集群。
目前所有集群都已经在 1.19 上,但 NodeGroups 仍在 1.18 上运行。 NodeGroups 的最后一次更新是在 12 月,那里一切正常。 自此时起,aws-auth ConfigMap 未修改。
现在我们要更新它们。 如果我们在更新时单击控制台或使用以下命令:
aws eks --region <clusterRegion> update-nodegroup-version --cluster-name=<clusterName> --nodegroup-name=<nodeGroupName>
...它失败了:
An error occurred (InvalidRequestException) when calling the UpdateNodegroupVersion operation: Nodegroup health has issues other than [ AsgInstanceLaunchFailures, InstanceLimitExceeded, InsufficientFreeAddresses, ClusterUnreachable ]
查看节点组的详细信息会显示以下消息:
AccessDenied: The aws-auth ConfigMap in your cluster is invalid.
相关的 ConfigMap(我们所有人都可以访问它)具有以下内容(从敏感信息中删除):
mapRoles: |
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::<accountId>:role/<ourEksClusterNodeRole>
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:masters
rolearn: arn:aws:iam::<accountId>:role/AWSReservedSSO_SystemAdministrator_<someRandomString>
username: {{SessionName}}
事实证明, AWS 文档提出的将 SSO 用户集成到集群中的方法与最新版本的 EKS 不兼容。
无法评估占位符{{SessionName}}
。 所以我不得不像这样改变它:
mapRoles: |
- groups:
- system:bootstrappers
- system:nodes
rolearn: arn:aws:iam::<accountId>:role/<ourEksClusterNodeRole>
username: system:node:{{EC2PrivateDNSName}}
- groups:
- system:masters
rolearn: arn:aws:iam::<accountId>:role/AWSReservedSSO_SystemAdministrator_<someRandomString>
username: awssso-system-administrator
这种方法的缺点是我们在日志中丢失了审计信息。
为了解决这个问题(虽然这真的很奇怪):
aws-auth
ConfigMap。aws-auth
ConfigMap 改回来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.