kube-proxy failed to install iptables rule

3/19/2015

I'm trying kubernetes guestbook example following https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/README.md

In Step Six: I modified the json file to allow accessing the guestbook site externally. The modification is: replace 10.11.22.33 with my IP, and remove line ""createExternalLoadBalancer": true"

When I try http://<my ip>:8000 in browser, the connection failed. With some searching an debugging, I find kube-proxy failed to install iptables rule, there are error logs as below. The log also tells that install iptable rule also failed for other service.

Any suggestion?

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

...

-- xiaoping yan
kubernetes

1 Answer

3/26/2015

Some older versions of Kubernetes had trouble selecting host interfaces in certain configurations (Issue 4218). It looks like that is what is going on here.

Unfortunately, the only real answer is to update to a more recent version of Kubernetes (re-deploy your cluster).

-- CJ Cullen
Source: StackOverflow