cloudstack-kubernetes-provider
cloudstack-kubernetes-provider copied to clipboard
Add hostname annotation to set loadbalancer ingress hostname
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.
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.
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 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