cloudstack-kubernetes-provider icon indicating copy to clipboard operation
cloudstack-kubernetes-provider copied to clipboard

Add hostname annotation to set loadbalancer ingress hostname

Open hrak opened this issue 2 years ago • 3 comments

This fixes problems with kube-proxy in ipvs mode considering the loadbalancer IP as local to the node (causing loadbalanced services to be unreachable).

See https://github.com/kubernetes/kubernetes/issues/66607

This can also be used to access PROXY proto service from the inside.

hrak avatar May 05 '23 06:05 hrak

Did some manual testing. After this change, I have verified that the service created has external IP equal to hostname set in service.beta.kubernetes.io/cloudstack-load-balancer-hostname. And the same hostname is also set in the status of the service.

vishesh92 avatar May 22 '24 07:05 vishesh92

Did some manual testing. After this change, I have verified that the service created has external IP equal to hostname set in service.beta.kubernetes.io/cloudstack-load-balancer-hostname. And the same hostname is also set in the status of the service.

cool, thanks @vishesh92 can you test ipvs mode if the issue can be reproduced and fixed by this change ?

weizhouapache avatar May 22 '24 08:05 weizhouapache

@weizhouapache I am not able to reproduce the issue, but I can verify the functionality is working as expected. For why hostname is required as part of the loadbalancerStatus, check: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#loadbalanceringress-v1-core

vishesh92 avatar May 22 '24 16:05 vishesh92