Amazon Custom Ami不加入EKS群集
我想拥有自定义的ami for eks,但是加入群集节点时有错误。
所有初始步骤通过而没有错误。但是一个节点尚未加入K8S群集。我看到错误 kubelet.go“错误获取节点” err =“ node \” ip-10-0-0-31-89.ec2.internal \“未找到”
我使用此Amazon EKS优化了Amazon Linux Amis ami-0baacf6d2f7060e93 for Kubernetes版本1.22
我的UserData是:
#!/bin/bash
sudo /etc/eks/bootstrap.sh '${cluster_name}' \
--b64-cluster-ca '${cluster_ca_certificate}' \
--apiserver-endpoint '${cluster_endpoint}' \
--use-max-pods=true \
--max-pods=20 \
--container-runtime containerd \
--ip-family ipv4 \
--kubelet-extra-args --node-labels=${karpenter_key}=${cluster_name},managed-by=karpenter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用'''不会将您传递给脚本的变量扩展。尝试:
创建aws-auth 如果您仅使用自我管理的节点组。
Use of '' will not expand the variable you passed to the script. Try:
Create aws-auth here if you only use self-managed node group.
错误是由于默认安全组未连接到节点实例
默认值:群集安全组是由亚马逊EKS为群集创建的。托管节点组使用此安全组进行控制平面到数据平面通信。 EKS控制台中称为“群集安全组”,
感谢您的答案。
The error was due to the default security group wasn't attached to the node instance
Default: Cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control-plane-to-data-plane communication. Referred to as 'Cluster security group' in the EKS console
Thanks all for your answers.