Kubeadm 安裝中的各種坑

2021-08-21 03:10:07 字數 2394 閱讀 6598

一、

error: failed to run kubelet: failed to create kubelet: misconfiguration: kubelet cgroup driver: "systemd" is different from docker cgroup driver: "cgroupfs"

解決:vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

updatekubelet_cgroup_args=--cgroup-driver=systemdtokubelet_cgroup_args=--cgroup-driver=cgroupfs

restart kubelet

二、unable to connect to the server: x509: certificate signed by unknown authority (possibly because of "crypto/rsa: verification error" while trying to verify candidate authority certificate "kubernetes")

解決:export kubeconfig=/etc/kubernetes/kubelet.conf

三、failed to request cluster info, will try again: [get x509: certificate has expired or is not yet valid]

解決:同步master和node的時間

四、the connection to the server localhost:8080 was refused - did you specify the right host or port?

解決:export kubeconfig=/etc/kubernetes/admin.conf

定義在6443埠 而不是8080

五、runtime network not ready: networkready=false reason:networkpluginnotready message:docker: network plugin is not ready: cni config uninitialized

解決:1.刪除/etc/systemd/system/kubelet.service.d/10-kubeadm.conf裡最後一行裡的$kubelet_network_args

2.重啟kubeletsystemctl enable kubelet && systemctl start kubelet

3.重新加入 kubeadm reset || kubeadm join ….

六、pod containercreating or error

describe一下 說sadbox建立失敗。 

warning failedcreatepodsandbox 20s (x12 over 54s) kubelet, tensorflow0 failed create pod sandbox.

normal sandboxchanged 20s (x12 over 53s) kubelet, tensorflow0 pod sandbox changed, it will be killed and re-created

解決:一般歸結為網路問題,檢視或重啟網路(calico或flanneld) 

七、kube-dns 啟動不成功

kube-system   po/kube-dns-6f4fd4bdf-p5x4k              0/3       pending   0          14m

①修改 /etc/systemd/system/kubelet.service.d/10-kubeadm.conf

刪除$kubelet_network_args         (別這麼做,不推薦)

②dns異常,kubeadm reset重來,試試先初始化master,然後配置calico或flannel網路,ok了以後,再加入其它機器

重啟systemctl daemon-reload &&systemctl restart kubelet

kubeadm reset

kubeadm init --kubernetes-version=v1.9.0 --pod-network-cidr=10.244.0.0/16

pyltp安裝中的各種坑

採用pip install pyltp,安裝過程十分曲折 坑一 提示沒有visual c 於是要先裝好vc 坑二 提示 d program files x86 microsoft visual studio 14.0 vc bin x86 amd64 cl.exe failed with exit ...

安裝scrapy中的各種坑

國內的映象源 清華源 https 豆瓣 http 可以在使用pip的時候加引數 i https 永久修改 linux下,修改 pip pip.conf 沒有就建立乙個 修改 index url至tuna,內容如下 windows下,直接在user目錄中建立乙個pip目錄,如 c users xx p...

docker安裝各種坑

今天記錄一下之前安裝docker遇到的各種坑。這是安裝要注意的兩點。安裝之後雙擊docker quickstart terminal,可能會提示你找不到base.exe這個程式,這是因為git的位址不對。右鍵點選docker quickstart terminal,在快捷方式裡面的目標修改正確的路徑...