Skip to content
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

Do not set --hostname-override on kube-proxy when joining a cluster #4360

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

neoaggelos
Copy link
Member

Summary

Closes #4345

Needs backport on all supported tracks

kube-proxy must be configured to use the same node name as kubelet, otherwise services with Local external traffic policy fail to forward traffic (since node name of endpoints does not match the node name of the proxy).

Description

In the past (for non HA), we would set --hostname-override flags on both kube-proxy and kubelet services. In recent times, we do not need to do this, and we end in a situation where kubelet is running with its proper hostname, but kube-proxy still tries to find a node with the IP as name (which does not exist).

For more details, see #4345 (comment)

Change

  • Clear the --hostname-override flag on the kube-proxy when joining a cluster. We would only do this if we set this flag for kubelet as well, but we don't.

Testing

Locally

Copy link
Contributor

@bschimke95 bschimke95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ktsakalozos ktsakalozos merged commit 772853c into master Jan 12, 2024
14 checks passed
@ktsakalozos ktsakalozos deleted the KU-178/kube-proxy-hostname branch January 12, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NodePort services with externalTrafficPolicy set to Local don't work on worker nodes
3 participants