Skip to content

Implement support for "Load balancer IP address mode" #811

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

Open
diesieben07 opened this issue Mar 13, 2025 · 0 comments
Open

Implement support for "Load balancer IP address mode" #811

diesieben07 opened this issue Mar 13, 2025 · 0 comments

Comments

@diesieben07
Copy link

diesieben07 commented Mar 13, 2025

When enabling the proxy protocol in a DO load balancer it breaks requests to hosts that point at the load balancer that originate from with in the cluster. The reason for this is that Kubernetes routes these requests directly inside the cluster, bypassing the load balancer. When the proxy protocol is enabled, the requests then end up as raw HTTPS at the Ingress, but the Ingress is expecting the proxy protocol.

This issue is described in the readme as well:
https://github.com/digitalocean/digitalocean-cloud-controller-manager/blob/master/docs/controllers/services/examples/README.md#accessing-pods-over-a-managed-load-balancer-from-inside-the-cluster

The existing workaround requires modifying the applications running within the cluster to talk to a different hostname. This is not always viable.

Since Kubernetes 1.32 controllers can set the "ipMode" for a load balancer, allowing configuration of this behavior. If it is set to "Proxy" then the load balancer is not bypassed for traffic from within the cluster. The relevant documentation is here:
https://kubernetes.io/docs/concepts/services-networking/service/#load-balancer-ip-mode

My understanding is that for this to be used on DO, a new annotation (akin to service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol, etc.) would need to be implemented in the DO Cloud Controller Manager to let users control this behavior.

For example:

apiVersion: v1
kind: Service
spec:
  type: LoadBalancer
metadata:
  annotations:
    service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: "false"
    service.beta.kubernetes.io/do-loadbalancer-ip-mode: "Proxy" # <<- HERE
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

No branches or pull requests

1 participant