-
Notifications
You must be signed in to change notification settings - Fork 134
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
Services with externalTrafficPolicy: Local
seem not to work
#173
Comments
Issue looks similar to what I see here: https://github.com/juju-solutions/bundle-canonical-kubernetes/issues/489 I get very much the same symptoms. In iptables:
In kube-proxy's logs:
|
/assign @detiber |
I'm currently testing a fix for this in #190, which uses an init container to update overrideHostname in the kube-proxy config. |
I just finished testing #179 with the reproducer provided and I am now able to access the NodePort with |
@detiber I have the same issue running kubernetes v1.9.5. Is there a workaround? Thanks. |
@bamb00 the workaround is documented here: https://kubernetes.io/docs/setup/independent/troubleshooting-kubeadm/#services-with-externaltrafficpolicy-local-are-not-reachable It may need to be modified to work with v1.9.5, though. |
@detiber I'm facing the same issue in kubernetes v1.18.1. Workaround you mentioned is not available in the above link . Can you help me to solve the issue ? |
@Zanis7 I'm not sure this project is being maintained anymore, but if you are hitting this issue, then you likely need to make sure that the Node resource, the Kubelet configuration, and the kube-proxy configuration all agree on what the local hostname of the local machine is, otherwise traffic is likely not being handled correctly. |
Thanks for your suggestion. I'll verify the same. |
If I create a
NodePort
Service withexternalTrafficPolicy: Local
, I can't connect to it on NODE_IP:NodePort. If the Service is patched to setexternalTrafficPolicy
toCluster
, connectivity works.Using a QuickStart deployed with all defaults (CoreDNS / Calico).
Example Deployment + Service that doesn't work unless I remove
externalTrafficPolicy
:Example session:
From Bastion host, after adjusting the SG applied to nodes to allow appropriate connectivity:
The text was updated successfully, but these errors were encountered: