Skip to content

allow inter-service communication from within cluster via external LB - #87

Merged
0xch4z merged 3 commits into
linode:masterfrom
0xch4z:fix/externalip-kubeproxy-workaround
Jan 28, 2021
Merged

0xch4z merged 3 commits into
linode:masterfrom
0xch4z:fix/externalip-kubeproxy-workaround

Conversation

@0xch4z

@0xch4z 0xch4z commented Dec 16, 2020 •

Copy link
Copy Markdown
Contributor

Closes #74

This changes the LoadBalancer status we return from EnsureLoadBalancer and GetLoadBalancer to only include the NodeBalancer hostname and not the IPv4 address. Omitting the IP ensures kube-proxy does not insert rules to hijack requests to the external LB IP from within the cluster to resolve to the cluster IP for the underlying pod. This proxying caused issues for users expecting the NodeBalancer to include proxy-protocol headers. See #74.

Due to LoadBalancer statuses not including the LB IPv4 address, LB discovery will now be done using the hostname.

@phillc phillc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd get 1 more approver.

This commit changes the LoadBalancer status we return from
EnsureLoadBalancer and GetLoadBalancer to only include the NodeBalancer
hostname and not the IPv4 address. Omitting the IP ensures
kube-proxy does not insert rules to hijack requests to the external LB
IP from within the cluster to resolve to the cluster IP for the
underlying pod. This proxying caused issues for users expecting the
NodeBalancer to include proxy-protocol headers. See linode#74.

Due to LoadBalancer statuses not including the LB IPv4 address, LB
discovery will now be done using the hostname.
@0xch4z
0xch4z force-pushed the fix/externalip-kubeproxy-workaround branch from 265841e to db061c7 Compare January 28, 2021 14:29
@0xch4z
0xch4z merged commit 65f097f into linode:master Jan 28, 2021
0xch4z added a commit to 0xch4z/linode-cloud-controller-manager that referenced this pull request Mar 3, 2021
This annotation will allow users to use short-circuit adding the
underlying NodeBalancer's IP to the LoadBalancerStatus (see linode#87). This
is now an opt-in feature as it's much quicker to expose the IPv4 as an
interface for the service than waiting for the DNS A record to be
propagated for the hostname.
LBGarber pushed a commit to LBGarber/linode-cloud-controller-manager that referenced this pull request Jun 17, 2021
This annotation will allow users to use short-circuit adding the
underlying NodeBalancer's IP to the LoadBalancerStatus (see linode#87). This
is now an opt-in feature as it's much quicker to expose the IPv4 as an
interface for the service than waiting for the DNS A record to be
propagated for the hostname.
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.

LoadBalancer Services cannot discover the true ClientIP

3 participants