-
Notifications
You must be signed in to change notification settings - Fork 485
support node local service without SNAT #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support node local service without SNAT #277
Conversation
…igin IP if the request from external IP
|
Excellent @GuoyouZhang, changes look good to me. I will test out briefly and merge. |
|
Thanks @GuoyouZhang! Quick question:
I don't see the necessary changes to ensure only services running the service pods will advertise external IPs, am I missing something? |
|
@andrewsykim It does not address #262 @GuoyouZhang annotating service after service is deployed does not work. i will open seperate issue for that. |
|
@andrewsykim |
|
@murali-reddy |
|
@GuoyouZhang how to enable the service? Would you like to provide cmd? Thanks. |
|
@KJSui please try adding |
|
@murali-reddy @GuoyouZhang After enabling this service as you suggest, if I did curling the service, the client ip wasn't preserved... If I curl the pod ip directly, I did see client ip appear, do you guys have any idea why the client ip doesn't appear if I curl the external ip of service? |
|
@murali-reddy the cmd should be kube-router.io/service.local="" not "true" after I tried many times. |
|
@GuoyouZhang @murali-reddy Another consideration I think we missed in this PR is that the iptable rules removing SNAT are being appended instead of replaced. So instead of seeing only we saw and I think since the previous rule is first in the chain it takes precedence? Only a problem when updating kube-router on an existing cluster. |
|
@andrewsykim i think your observation is right. I will fix it. |
use case: in VNF, traffic come from external client, and go through router ECMP to k8s node. The pod needs to know the external client IP. To meet this case:
Finally, kube-router will advertise external IP for the node, which really has the local pod and can serve the external request without SNAT.