日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

k8s安裝過程遇到的問題

作者:Chsavvy 更新時間: 2022-04-14 編程語言

一、etcd集群部署遇到的問題

1.etcd.serverice啟動報錯,顯示–logger=zap有問題

解決:修改配置文件,去掉該參數,重新啟動服務

2.publish error: etcdserver: request timed out,由于etcd集群沒有同時啟動導致

解決:在部署了etcd的節點上,同時啟動etcd服務systemctl start etcd

3.error #1: dial tcp 127.0.0.1:2379: connect: connection refused,由于參數ETCD_LISTEN_CLIENT_URLS沒有將172.0.0.1:2379包含在內

解決:ETCD_LISTEN_CLIENT_URLS添加https://172.0.0.1:2379或者直接改成0.0.0.0:2379

4.error #1: dial tcp 127.0.0.1:4001: connect: connection refused,由于低版本的peer的監聽端口是否4001

解決:ETCD_LISTEN_CLIENT_URLS和ETCD_ADVERTISE_CLIENT_URLS參數上配置4001的監聽端口

5.error #1: net/http: HTTP/1.x transport connection broken: malformed HTTP response “\x15\x03\x01\x00\x02\x02”,由于配置信息監聽地址寫成了http://

解決:將監聽地址改成https://

二、kube-apiserver.service遇到的錯誤

1.error: unable to find suitable network address.error=‘no default routes found in “/proc/net/route” or “/proc/net/ipv6_route”’. Tr… to fix this,由于沒有配置網關路由問題

解決:route add default gw 172.16.0.1

2.error: --etcd-servers must be specified

解決:sudo journalctl -xe -u kube-apiserver | more通過查看更多錯誤信息,除了error: --etcd-servers must be specified錯誤提示外無其他錯誤信息,通過手動執行system unit檢查是否配置有誤,手動能正常啟動,說明配置文件可能存在字符錯誤,重新寫入配置后,啟動正常

3.watch chan error: etcdserver: mvcc: required revision has been compacted,由于etcd的版本問題導致的,不影響功能的使用

解決:可以安裝對應版本的etcd

三、kubelet和kube-proxy部署遇到的錯誤

1.failed complete: v1alpha1.KubeProxyConfiguration.ClientConnection: readObjectStart: expect { or n, but found “, error found in #10 byte of …|nection”:“kubeconfig|…, bigger context …|pha1”,“bindAddress”:“0.0.0.0”,“clientConnection”:"kubeconfig:/data/kubernetes/cfg/kube-proxy.kubecon|…

解決:檢查yml文件格式是否正確,yml配置文件遇到":“或者”-"后面必須留一個空格!

2.Container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized,由于沒有插件cni

解決:修改kubelet.conf配置文件去掉相關配置參數–network-plugin=cni,重啟服務即可或者下在安裝cni插件

3.在錯誤日志中發現:E0927 15:38:12.475997 16586 kubelet.go:1308] Image garbage collection failed once. Stats initialization may not have completed yet: failed to get imageFs info: unable to find data in memory cache

解決:yum -y upgrade systemd

4.failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to f…

解決:node節點上沒有關閉交換分區,臨時關閉的swapoff -a,最好就是永久關閉

原文鏈接:https://blog.csdn.net/weixin_44375561/article/details/120512543

欄目分類
最近更新