环境信息:
K3s 版本:
k3s version v1.19.3+k3s3
节点 CPU 架构、操作系统和版本::
Linux 10-255-11-208 5.14.0-162.6.1.el9_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 18 02:06:38 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
集群配置:
2 server 3 agent
问题描述:
k3s 存储使用的是MySQL 5.7 安装是启动报错:
time=“2024-12-05T18:25:11.812016164+08:00” level=info msg=“Wrote kubeconfig /root/.kube/config”
time=“2024-12-05T18:25:11.812096618+08:00” level=info msg=“Run: k3s kubectl”
time=“2024-12-05T18:25:11.812172370+08:00” level=warning msg=“Failed to find cpuset cgroup, you may need to add "cgroup_enable=cpuset" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
time=“2024-12-05T18:25:11.812197297+08:00” level=error msg=“Failed to find memory cgroup, you may need to add "cgroup_memory=1 cgroup_enable=memory" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
time=“2024-12-05T18:25:11.812211487+08:00” level=fatal msg=“failed to find memory cgroup, you may need to add "cgroup_memory=1 cgroup_enable=memory" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
复现步骤:
- 安装 K3s 的命令:
cat /usr/local/bin/k3s_install.sh | INSTALL_K3S_SKIP_DOWNLOAD=true
INSTALL_K3S_EXEC=“server --docker
–data-dir=/data/apps/rancher/k3s
…
–log=/var/log/k3s-server.log
–datastore-endpoint=mysql://k3s_user:1234@tcp(10.25.10.1:3306)/thcth_k3s” sh -s -
预期结果:
启动成功
实际结果:
附加上下文/日志:
time=“2024-12-05T18:31:15.371879471+08:00” level=info msg=“To join node to cluster: k3s agent -s https://10.255.11.208:6443 -t ${NODE_TOKEN}”
time=“2024-12-05T18:31:15.373492236+08:00” level=info msg=“Wrote kubeconfig /root/.kube/config”
time=“2024-12-05T18:31:15.373550016+08:00” level=info msg=“Run: k3s kubectl”
time=“2024-12-05T18:31:15.373619596+08:00” level=warning msg=“Failed to find cpuset cgroup, you may need to add "cgroup_enable=cpuset" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
time=“2024-12-05T18:31:15.373633473+08:00” level=error msg=“Failed to find memory cgroup, you may need to add "cgroup_memory=1 cgroup_enable=memory" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
time=“2024-12-05T18:31:15.373644814+08:00” level=fatal msg=“failed to find memory cgroup, you may need to add "cgroup_memory=1 cgroup_enable=memory" to your linux cmdline (/boot/cmdline.txt on a Raspberry Pi)”
[/details]