騰訊雲三台不同區外網部署k8s v1.18集群問題整理


一.集群部署步驟操作:

詳細查看【許大仙】整理的命令合集,地址:https://www.yuque.com/fairy-era/yg511q/hg3u04

二.部署過程中常見問題

     1.kubeadm init ............出現下圖:

      

      這是由於雲網絡類型導致,感興趣可以詳細查看一下!

      解決:

     kubeadm init...當檢測到有 etcd.yaml 生成時,立即在另一個窗口編輯修改,命令:

     vim /etc/kubernetes/manifests/etcd.yaml

     修改文件中下面三行如下:

      # 也就是將多余的公網ip刪除,將公網ip改為127
    - --listen-client-urls=https://127.0.0.1:2379
    - --listen-metrics-urls=http://127.0.0.1:2381
    - --listen-peer-urls=https://127.0.0.1:2380

 

    解決思路可以查看這位大佬:https://blog.csdn.net/rdj1314/article/details/119803703

  2.coreDns狀態CrashLoopBackOff問題解決

  解決方式:https://www.yoyoask.com/?p=2209

3.coredns對應的pod狀態為ContainerCreating

  網上搜索一圈無效后又研究了下kubeadm reset命令執行后的輸出結果:

 The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d

  The reset process does not reset or clean up iptables rules or IPVS tables.
  If you wish to reset iptables, you must do so manually by using the "iptables" command.

  If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
  to reset your system's IPVS tables.

  The reset process does not clean your kubeconfig files and you must remove them manually.
  Please, check the contents of the $HOME/.kube/config file.

 然后根據上面的提示把/etc/cni/net.d目錄刪掉,然后重新執行kubeadm init命令就可以了


 解決方式:

   先執行命令:rm -rf  /etc/cni/net.d  

   再執行kubeadm init xxxxxxx

   可以查看地址:https://blog.csdn.net/john1337/article/details/109352414

 

3.failed to set bridge addr: "cni0" already has an IP address different from 10.244.1.1/24

  解決方法:

        將這個錯誤的網卡刪掉,它會自己重建,這里采用刪除重生的方法,首先停用網絡,然后刪除配置,命令如下:

    1. ifconfig cni0 down
    2. ip link delete cni0
       
      詳細查看:https://blog.csdn.net/Wuli_SmBug/article/details/104712653

 

 


 

 

 


免責聲明!

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



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