kubernetes安裝過程報錯及解決方法


1.your configuration file uses an old API spec: "kubeadm.k8s.io/v1alpha2".

執行kubeadm init --config /etc/kubernetes/kubeadm-master.config --ignore-preflight-errors=all報錯

apiVersion: kubeadm.k8s.io/v1alpha3
kind: MasterConfiguration

2.The HTTP call equal to 'curl -sSL http://localhost:10248/healthz' failed with error: Get http://localhost:10248/healthz: dial tcp [::1]:10248: connect: connection refused.

[root@localhost kubernetes]# vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true --fail-swap-on=false"
[root@localhost kubernetes]# systemctl daemon-reload  
[root@localhost kubernetes]# systemctl restart kubelet

 

 

3./etc/kubernetes/manifests/kube-apiserver.yaml already exists

rm -rf /etc/kubernetes/manifests

 4.kubectl get pod狀態為ErrImagePull && ImagePullBackOff  ErrImageNeverPull,請確保node上有相應的鏡像,沒有則在node機器上進行docker pull,且deployment中imagePullPolicy:IfNotPresent

image: tomcat:8 #確保node節點上有該鏡像且可正常運行,注意是node節點機器上,不是master機器
         imagePullPolicy: IfNotPresent ##Always,IfNotPresent,Never

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM