Closed whenandwhy closed 11 months ago
之前老版本kubelet使用docker 运行时 cgroups 支持 systemd 不好,目前主流都使用containerd 运行时, 把 /root/repo/kubeasz/roles/kube-node/vars/main.yml 变量改成如下就好
CGROUP_DRIVER: "systemd"
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
之前老版本kubelet使用docker 运行时 cgroups 支持 systemd 不好,目前主流都使用containerd 运行时, 把 /root/repo/kubeasz/roles/kube-node/vars/main.yml 变量改成如下就好
CGROUP_DRIVER: "systemd"
已解决,感谢高手解答
What would you like to be added?
整个集群六台服务器,执行setup 05 master没问题worker node报错 (TASK [kube-node : 创建kubelet的配置文件] ** fatal: [XX.XX.XX.94]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: {%- if CONTAINER_RUNTIME == 'containerd' -%} systemd {%- else -%} {%- if DOCKER_VER|float >= 20.10 -%} systemd {%- else -%} cgroupfs {%- endif -%} {%- endif -%}: 'DOCKER_VER' is undefined"} fatal: [XX.XX.XX.95]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: {%- if CONTAINER_RUNTIME == 'containerd' -%} systemd {%- else -%} {%- if DOCKER_VER|float >= 20.10 -%} systemd {%- else -%} cgroupfs {%- endif -%} {%- endif -%}: 'DOCKER_VER' is undefined"} fatal: [XX.XX.XX.96]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: {%- if CONTAINER_RUNTIME == 'containerd' -%} systemd {%- else -%} {%- if DOCKER_VER|float >= 20.10 -%} systemd {%- else -%} cgroupfs {%- endif -%} {%- endif -%}: 'DOCKER_VER' is undefined"})
其中hosts文件配置如下
'etcd' cluster should have odd member(s) (1,3,5,...)
[etcd] XX.XX.XX.91 XX.XX.XX.92 XX.XX.XX.93
master node(s)
[kube_master] XX.XX.XX.91 XX.XX.XX.92 XX.XX.XX.93
work node(s)
[kube_node] XX.XX.XX.91 XX.XX.XX.92 XX.XX.XX.93 XX.XX.XX.94 XX.XX.XX.95 XX.XX.XX.96
Why is this needed?
求高手解答