kubernete 安裝常見問題彙總

一、Sep 15 18:22:07 k8s-node1 kubelet: E0915 18:22:07.628384 12912 summary.go:102] Failed to get system container stats for "/system.slice/kubelet.service": failed to get cgroup stats for "/system.slice/kubelet.service": failed to get container info for "/system.slice/kubelet.service": unknown container "/system.slice/kubelet.servicenode

docker須要重啓docker


二、
[discovery] Failed to request cluster info, will try again: [Get https://192.168.1.112:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: x509: certificate has expired or is not yet validcentos

單節點加入時區不對,須要ntpupdate 下時間 ntpdate 182.92.12.11api


三、
若是kubectl get nodes 有節點狀態是not ready 狀態,可重啓該節點的dockerapp

執行kubectl get nodes 提示以下:
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")
解決辦法,記的kubeadm reset會刪除: ide


四、
error: open /var/lib/kubelet/config.yaml: no such file or directory
關鍵文件缺失,多發生於沒有作 kubeadm init就運行了systemctl start kubeletgoogle


五、
kubeadm init --apiserver-advertise-address=192.168.11.12 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.13.4 --pod-network-cidr=10.244.0.0/16
kubernete v1.13.4能夠指定源進行安裝spa


六、
kubernete v1.13.4 支持docker-ce-18.06.3.ce-3.el7.x86_64.net


七、
kubectl get pod --all-namespaces -o wide  
保證集羣進入running 狀態後再查看集羣狀態,不然可能不正常.這須要幾分鐘server


八、
swapoff | #/dev/mapper/centos-swap swap swap defaults 0 0
關閉swap交換分區,交換分區技術如今基本沒人用


九、kubeadm 重置命令,kubeadm reset,這個會反覆用到


十、
kubectl drain node2 --delete-local-data --force --ignore-daemonsets
kubectl delete node node2
kubeadm join 192.168.11.12:6443 --token vabefc.eilf71g7y96twbyz --discovery-token-ca-cert-hash sha256:4e6f2149e6488be130611ccc92137cdaf7a3c64a919c4454604f9857d51453a7
集羣加入節點,刪除節點


#k8s問題彙總
http://www.javashuo.com/article/p-fmdpyxqp-hk.html

相關文章
相關標籤/搜索