|NO.Z.00085|——————————|^^ 部署 ^^|——|KuberNetes&kubeadm.V14|5台Server|——|kubernetes配置|配置更改|

一、kubernetes配置更改
### --- 配置更改——必须

~~~     # kube-proxy配置更改
~~~     将Kube-proxy改为ipvs模式,因为在初始化集群的时候注释了ipvs配置,所以需要自行修改

二、在master01节点执行

### --- 查看kube-proxy现在的模式是什么
~~~     注:iptables的性能是有点差的,所以需要ipvs

[root@k8s-master02 ~]# curl 127.0.0.1:10249/proxyMode
iptables
三、更改为ipvs
### --- 更改为kube-proxy配置为ipvs

[root@k8s-master01 ~]# kubectl edit cm kube-proxy -n kube-system
    mode: "ipvs"
四、滚动更新kube-proxy的pod
### --- 滚动更新kube-proxy

[root@k8s-master01 ~]# kubectl patch daemonset kube-proxy -p "{\"spec\":{\"template\":{\"metadata\":{\"annotations\":{\"date\":\"`date +'%s'`\"}}}}}" -n kube-system
daemonset.apps/kube-proxy patched
五、验证Kube-Proxy模式
### --- 查看kube-proxy更改后的模式

[root@k8s-master01 ~]# curl 127.0.0.1:10249/proxyMode
ipvs
### --- 查看ipvs规则

[root@k8s-master01 ~]# ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  172.17.0.1:32418 rr
  -> 172.161.125.2:8443           Masq    1      0          0         
TCP  172.169.244.192:32418 rr

 
 
 
 
 
 
 
 
 

Walter Savage Landor:strove with none,for none was worth my strife.Nature I loved and, next to Nature, Art:I warm'd both hands before the fire of life.It sinks, and I am ready to depart
                                                                                                                                                   ——W.S.Landor

 

 

posted on   yanqi_vip  阅读(33)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· 什么是nginx的强缓存和协商缓存
· 一文读懂知识蒸馏
· Manus爆火,是硬核还是营销?
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示