Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

iptables: adapt for new iptables mode #1612

Merged

Conversation

jlebon
Copy link
Contributor

@jlebon jlebon commented Aug 24, 2016

In the new "iptables" mode of kube-proxy, packets addressed for a node
port will get DNAT'ed to one of the endpoints. If that endpoint does not
reside on the node, then flannel needs to be able to do the proxying to
the endpoint. We generalize and add flannel rules for this.

If the endpoint does reside on the node, then the packet will be
addressed to the docker bridge, in which case we need to allow it. We
modify the node rules for this. The previous node rules there are no
longer needed (they were only relevant in the "userspace" mode).


This change is Reviewable

In the new "iptables" mode of kube-proxy, packets addressed for a node
port will get DNAT'ed to one of the endpoints. If that endpoint does not
reside on the node, then flannel needs to be able to do the proxying to
the endpoint. We generalize and add flannel rules for this.

If the endpoint does reside on the node, then the packet will be
addressed to the docker bridge, in which case we need to allow it. We
modify the node rules for this.
@jlebon
Copy link
Contributor Author

jlebon commented Aug 25, 2016

Modified to keep the previous rules as well so that we support both userspace and iptables proxy modes.

In the bigger picture, this might be something that should be offloaded to kube-proxy during startup.

@jasonbrooks
Copy link
Contributor

jasonbrooks commented Aug 25, 2016

I just tested this w/ centos atomic & it works for me. Thanks! LGTM

@ingvagabund
Copy link
Contributor

@redhat-k8s-bot test please

@redhat-k8s-bot
Copy link

RH ansible test passed for commit a171eb6

Build time: 0:10:26

@ingvagabund ingvagabund added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2016
@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/ansible lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants