分享一下我的问题吧
表面报错:
Please wait for the installation to complete: >>—>
16:41:30 CST failed: [master]
error: Pipeline[CreateClusterPipeline] execute failed: Module[CheckResultModule] exec failed:
failed: [master] execute task timeout, Timeout=2h
原因分析:
执行:journalctl -fu kubelet
报错:11月 15 11:28:50 tmaster2 kubelet[4106]: I1115 11:28:50.675831 4106 cni.go:239] “Unable to update cni config” err=“no networks found in /etc/cni/net.d”
11月 15 11:28:52 tmaster2 kubelet[4106]: E1115 11:28:52.125041 4106 kubelet.go:2381] “Container runtime network not ready” networkReady=“NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized”
11月 15 11:28:55 tmaster2 kubelet[4106]: I1115 11:28:55.676297 4106 cni.go:239] “Unable to update cni config” err=“no networks found in /etc/cni/net.d”
11月 15 11:28:57 tmaster2 kubelet[4106]: E1115 11:28:57.134508 4106 kubelet.go:2381] “Container runtime network not ready” networkReady=“NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized”
11月 15 11:28:57 tmaster2 kubelet[4106]: E1115 11:28:57.690914 4106 kubelet.go:1751] “Unable to attach or mount volumes for pod; skipping pod” err=“unmounted volumes=[bpffs], unattached volumes=[kube-api-access-2grvf cni-net-dir policysync cni-bin-dir var-run-calico lib-modules cni-log-dir host-local-net-dir xtables-lock var-lib-calico bpffs sys-fs nodeproc]: timed out waiting for the condition” pod=“kube-system/calico-node-tsqpc”
11月 15 11:28:57 tmaster2 kubelet[4106]: E1115 11:28:57.690970 4106 pod_workers.go:951] “Error syncing pod, skipping” err=“unmounted volumes=[bpffs], unattached volumes=[kube-api-access-2grvf cni-net-dir policysync cni-bin-dir var-run-calico lib-modules cni-log-dir host-local-net-dir xtables-lock var-lib-calico bpffs sys-fs nodeproc]: timed out waiting for the condition” pod=“kube-system/calico-node-tsqpc” podUID=cad158b0-d3d2-4ea2-b9a6-9a4b31d1404f
分析:k8s 1.22.12版本太新,我的操作系统是centos7.5,内核版本太低,安装calico失败,需要升级内核至4.4以上
uname -r 我的版本是:3.10.0-862.el7.x86_64