Skip to content

hosts 不全,导致pod异常 #1464

@richzhu369

Description

@richzhu369

What happened? 发生了什么问题?

hi,每一个节点应用都会在/etc/hosts里面记录所有node的 ip 和 服务器名称吧,但是我目前使用 3.6.6 安装好后的集群,每一台服务器的上的hosts都不完整,而且只有一个master02的记录,很奇怪

Image

这个 集群 除了master02,其他都是执行 setup all 安装的, 只有master02 是后期我 add-master 安装的, 我怀疑这个功能里有bug

这个bug还挺坑的,我140多个节点,都要手动去维护 /etc/hosts

What did you expect to happen? 期望的结果是什么?

希望提供 重建/etc/hosts的功能,这样在发生hosts缺失的时候,我可以通过kubeasz来重建hosts,不用手动维护

How can we reproduce it (as minimally and precisely as possible)? 尽可能最小化、精确地描述如何复现问题

amazone linux 2023 系统
kubeasz 3.6.6版本
kubernetes 1.32.3

dk ezctl setup all 安装 集群后,del-master删除maste02再次使用 add-master功能增加一个master02

Anything else we need to know? 其他需要说明的情况

No response

Kubernetes version k8s 版本

1.32.3

Kubeasz version

3.6.6

OS version 操作系统版本

# On Linux:
$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.7.20250414"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2029-06-30"
$ uname -a
Linux br-prod-k8s-manager 6.1.132-147.221.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr  8 13:14:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Related plugins (CNI, CSI, ...) and versions (if applicable) 其他网络插件等需要说明的情况

CNI 是cilium 其他默认

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions