openelb
openelb copied to clipboard
OpenELB keeps changing ip addresses of services
Describe the bug
After deploying a few helm charts, I came to the discovery that they created a double entry for eip.openelb.kubesphere.io/v1alpha2 in load balanced services' metadata. This in itself is a bug, but this double entry caused OpenELB to keep changing the ip addresses.
To Reproduce
Deploy helm charts of bitnami (postgresql & spark) and airflow (apache).
Expected behaviour
I expected that OpenELB was hardened enough to prevent continuously changing the ip address of services.
Output
N/A
Version Info
Version of Kubernetes: 1.26.0 Version of OpenELB: 0.4.4 (installed with helm)
Removing the duplicate entries seems to help. Once removed the issue cannot be recreated as k8s doesn't allow it. But this may happen more often as I already found 3 helm charts that are causing this issue. So it might be a good idea to harden OpenELB for.
According to your description, I did not reproduce it, can you describe it in more detail?
At the moment, I cannot show the situation I have. But later today or tomorrow I will rebuild the cluster on my test environment.
The thing I already can tell you, is that you have 2 different eip's added. I have seen that the same eip was added twice. What I am not sure of is that this will only occur with multiple services with duplicate eip's.
Something else that I have found is that it is not possible to create these duplicates manually. It has to be done by scripts and maybe only with helm charts. This makes me think that there is a bug in kubernetes or helm.
According to your description, I tried it again, but I still can't reproduce the problem. You can check to see if it's caused by other factors.
I have 3 services like below:
Here you can see that eip.openelb.kubesphere.io/v1alpha1
is twice in the service.
These services are created by helm charts. The charts used are:
I have noticed that the problem I described does not occur when there are only 2 services with this duplicate key, but it happens with 3 services. And the ip addresses are only changing between these 3 services. Other services that don't have this duplicate key occurrance, are not affected.
eip.openelb.kubesphere.io/v1alpha1
is similar to svc.Spec.LoadBalancerIP
for specifying svc ip.
eip.openelb.kubesphere.io/v1alpha2
is the eip pool designated for assigning ip addresses.
Here you can delete annotation eip.openelb.kubesphere.io/v1alpha1
.