kube-proxy无法安装iptables规则

时间:2015-03-19 07:13:21

标签: kubernetes

我正在尝试https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/README.md

之后的kubernetes留言板示例

在第六步中:我修改了json文件以允许从外部访问留言簿网站。 修改是:用我的IP替换10.11.22.33,并删除行“”createExternalLoadBalancer“:true”

当我在浏览器中尝试http://<my ip>:8000时,连接失败。 有些搜索调试,我发现kube-proxy无法安装iptables规则,有错误日志如下。该日志还告诉安装iptable规则也失败了其他服务。

有什么建议吗?

Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.543645     629 proxier.go:563] Failed to install iptables KUBE-PORTALS-HOST rule for service "frontend"
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.543685     629 proxier.go:377] Failed to ensure portal for "frontend": error checking rule: exit status 2: iptables v1.4.21: Port `:f816:3eff:fedf:8037]:51072' not valid
Mar 19 06:23:28 centos-minion kube-proxy[629]: Try `iptables -h' or 'iptables --help' for more information.
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.548287     629 proxier.go:563] Failed to install iptables KUBE-PORTALS-HOST rule for service "kubernetes-ro"
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.548310     629 proxier.go:377] Failed to ensure portal for "kubernetes-ro": error checking rule: exit status 2: iptables v1.4.21: Port `:f816:3eff:fedf:8037]:47447' not valid
Mar 19 06:23:28 centos-minion kube-proxy[629]: Try `iptables -h' or 'iptables --help' for more information.
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.555138     629 proxier.go:563] Failed to install iptables KUBE-PORTALS-HOST rule for service "kubernetes"
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.555161     629 proxier.go:377] Failed to ensure portal for "kubernetes": error checking rule: exit status 2: iptables v1.4.21: Port `:f816:3eff:fedf:8037]:53103' not valid
Mar 19 06:23:28 centos-minion kube-proxy[629]: Try `iptables -h' or 'iptables --help' for more information.
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.560348     629 proxier.go:563] Failed to install iptables KUBE-PORTALS-HOST rule for service "redis-master"
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.560366     629 proxier.go:377] Failed to ensure portal for "redis-master": error checking rule: exit status 2: iptables v1.4.21: Port `:f816:3eff:fedf:8037]:37187' not valid
Mar 19 06:23:28 centos-minion kube-proxy[629]: Try `iptables -h' or 'iptables --help' for more information.
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.565802     629 proxier.go:563] Failed to install iptables KUBE-PORTALS-HOST rule for service "redis-slave"
Mar 19 06:23:28 centos-minion kube-proxy[629]: E0319 06:23:28.565824     629 proxier.go:377] Failed to ensure portal for "redis-slave": error checking rule: exit status 2: iptables v1.4.21: Port `:f816:3eff:fedf:8037]:55949' not valid

...

1 个答案:

答案 0 :(得分:1)

某些旧版本的Kubernetes在某些配置(Issue 4218)中选择主机接口时遇到问题。看起来这就是这里发生的事情。

不幸的是,唯一真正的答案是更新到更新版本的Kubernetes(重新部署您的群集)。