大网数据广告活动
服务器运维问答

All kube-system pods keep crashing, etcd receives sigterm

· 52CE 我爱测

I'm trying to set up an on-premises Kubernetes cluster. For starters I used kubeadm to initialize my control plane on one node. But all kube-system pods constantly crash. I took a deep look into the pod logs via crictl and it tur…

问题原文

原帖链接 · Be Ku · CC BY-SA 4.0

I'm trying to set up an on-premises Kubernetes cluster. For starters I used kubeadm to initialize my control plane on one node. But all kube-system pods constantly crash. I took a deep look into the pod logs via crictl and it turns out that most pods crash because they cannot reach the kube-apiserver on <node IP>:6443. And the kube-apiserver seems to crash, because it cannot reach etcd on 127.0.0.1: 2379. And etcd 'crashes' because it receives a sigterm after a couple of minutes without any apparent reason. Using strace on the etcd container process gives:

--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=0, si_uid=0} ---

I've tried flanneld, calico and weave net as CNI, without success. Swap was already disabled from the beginning. Firewall does not have any custom rules. As a kubernetes newbie I cannot think of other possible reasons why this fails and would be grateful for any hints.

System information:

  • Debian 11 on VM, 2 CPUs, 8GB Memory
  • Kubernetes v1.25.0
  • kubeadm, kubectl, kubelet version: 1.25.0-00, all installed via apt following kubeadm installation docs
  • containerd v1.6.8, installed following getting-started guide using binary from releases
    • runc v1.1.4 binary from GitHub
    • containernetworking plugins v1.1.1 from GitHub
  • Cgroup systemd, configured as described here and here

已采纳解答

原帖链接 · Slyke · CC BY-SA 4.0

Having the same issue with etcd. Are you by any chance using --upload-certs and have a multi-master environment?

Try adding:

GRUB_CMDLINE_LINUX_DEFAULT="systemd.unified_cgroup_hierarchy=0"

To your /etc/default/grub file and then run update-grub, reboot and see if that helps.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2022-09-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。