atomic-site icon indicating copy to clipboard operation
atomic-site copied to clipboard

In Fedora 26 Atomic, Docker 1.13 prevents Kubernetes Services from opening NodePort

Open daryllstrauss opened this issue 8 years ago • 6 comments
trafficstars

Docker 1.13 changed the default FORWARD policy from ACCEPT to DENY that prevents services of type NodePort from working.

Workaround is appears to be: /sbin/iptables -I FORWARD 1 -o docker0 -j ACCEPT -m comment --comment "docker subnet" on all the nodes in the cluster.

If you follow the Getting Started guide on the Project Atomic website and do the steps manually (ansible include the fix) you'll get a configuration where NodePort doesn't work. That leads to hair pulling and substantial frustration.

The Getting Started docs should be updated to explain this step until a more proper fix is deployed.

daryllstrauss avatar Aug 24 '17 16:08 daryllstrauss

Seems like we need to doc this more places than just the Getting Started guide.

jberkus avatar Aug 24 '17 17:08 jberkus

Actually it looks like that rule only allows NodePort to work on the host running the pod. Since NodePort should forward from any minion node I ended up with:

iptables -I FORWARD 1 -i flannel.1 -j ACCEPT -m comment --comment "flannel subnet" iptables -I FORWARD 1 -o flannel.1 -j ACCEPT -m comment --comment "flannel subnet"

That allows the forwarding to work between minion nodes. I think that's reasonably restricted, but someone more familiar with the networking should confirm that's a good answer.

daryllstrauss avatar Aug 25 '17 00:08 daryllstrauss

@jasonbrooks ?

jberkus avatar Aug 25 '17 19:08 jberkus

@jlebon what do you think?

jasonbrooks avatar Aug 25 '17 19:08 jasonbrooks

Right, those are the same rules as in https://github.com/kubernetes/contrib/pull/1612. Probably we should just point users to https://github.com/kubernetes/contrib from the get-go?

jlebon avatar Aug 25 '17 19:08 jlebon

I'm in favor of that. Some people resist ansible, I think they think it's going to be a big investment in learning about a new configuration management system. Others want a manual approach to sort of get their hands dirty, learn the details, etc.

jasonbrooks avatar Aug 25 '17 19:08 jasonbrooks