k8s 1.13部署pod和node中无法ping同cluster ip

本文介绍了在k8s 1.13版本中遇到的Pod和Node无法ping通Cluster IP的问题。问题源于kube-proxy的配置,具体是`--proxy-mode`设置不当。通过将`--proxy-mode`更改为ipvs模式,并重启kube-proxy服务,成功解决了这个问题,但具体问题原因尚不明确。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题

在node上和pod中无法ping通cluster ip

在这里插入图片描述

节点之前的网络是kube-proxy管理的,检查kube-proxy 的配置

vim /lib/systemd/system/kube-proxy.service
[Unit]
Description=Kubernetes Proxy
After=network.target

[Service]
WorkingDirectory=/var/lib/kube-proxy
ExecStart=/usr/local/bin/kube-proxy \
  --bind-address=192.168.205.10 \
  --v=4 \
  --kubeconfig=/etc/kubernetes/kube-proxy.kubeconfig
Restart=on-failure

[Install]
WantedBy=multi-user.target

导致这个问题的配置项是 --proxy-mode

 --proxy-mode ProxyMode                         Which proxy mode to use: 'userspace' (older) or 'iptables' (faster) or 'ipvs' (experimental). If blank, use the best-available proxy (currently iptables).  If the iptables proxy is selected, regardless of how, but the system's kernel or iptables versions are insufficient, this always falls b
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值