ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
**1. 到网站[https://tool.lu/ip/](https://tool.lu/ip/)查看域名[raw.githubusercontent.com](http://raw.githubusercontent.com/)对应的IP地址** ![](https://img.kancloud.cn/aa/f4/aaf4186b540069734a1447f00b2d21f7_1402x595.png) <br/> **2. 添加 hosts【k8s-master1节点】** ```shell # cat >> /etc/hosts << EOF 185.199.109.133 raw.githubusercontent.com EOF ``` <br/> **3. 下载文件`kube-flannel.yml`并应用【k8s-master1节点】** ```shell # mkdir -p /opt/install/k8s/conf/ # cd /opt/install/k8s/conf/ # wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml # kubectl apply -f /opt/install/k8s/conf/kube-flannel.yml ``` <br/> **4. 查看网络状态【k8s-master1节点】** ```shell (1)查看状态 # kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE coredns-5bbd96d687-k42cn 1/1 Running 0 80m coredns-5bbd96d687-x9nnn 1/1 Running 0 80m etcd-k8s-master1 1/1 Running 0 80m kube-apiserver-k8s-master1 1/1 Running 0 80m kube-controller-manager-k8s-master1 1/1 Running 0 80m kube-proxy-28pz6 1/1 Running 0 80m kube-proxy-kbbwr 1/1 Running 0 57m kube-proxy-ncslh 1/1 Running 0 57m kube-scheduler-k8s-master1 1/1 Running 0 80m (2)等上面的状态全部为 Pending,或 Running 时,可以看到 k8s 各个节点为 Ready(已准备好) # kubectl get nodes NAME STATUS ROLES AGE VERSION k8s-master1 Ready control-plane 82m v1.26.2 k8s-node1 Ready <none> 59m v1.26.2 k8s-node2 Ready <none> 59m v1.26.2 ```