clickhouse-operator icon indicating copy to clipboard operation
clickhouse-operator copied to clipboard

Failed to reconcile after changing ClusterIP to LoadBalancer

Open markandrus opened this issue 3 years ago • 3 comments

We received the following error after changing our replica-service-template to use a LoadBalancer instead of ClusterIP:

-                type: 'ClusterIP',
-                clusterIP: 'None'
+                type: 'LoadBalancer'
Create Service clickhouse-v2/chi-v2-v2-0-0 failed with error Service "chi-v2-v2-0-0" is invalid: spec.clusterIPs[0]: Invalid value: "None": may not be set to 'None' for LoadBalancer services

Not sure how to reconcile. Maybe get rid of the replica-service-template and add it back?

markandrus avatar Jul 27 '22 09:07 markandrus

@markandrus , could you try to remove clusterIP?

alex-zaitsev avatar Jul 27 '22 10:07 alex-zaitsev

That worked: I deleted the service which was assigned the ClusterIP before redeploying my changes. 👍 Thanks

markandrus avatar Jul 27 '22 11:07 markandrus

I guess it's atypical to do this on an existing cluster? We are probably going to leave the ClusterIPs for internal replication and move to managing LoadBalancers ourselves. Our LoadBalancers are only for ingestion, and we don't way to pay the overhead of replicating through.

markandrus avatar Jul 27 '22 11:07 markandrus

Fixed in 0.23.x. This is actually a Kubernetes bug, so service needs to re-created when type is changed.

alex-zaitsev avatar Feb 14 '24 16:02 alex-zaitsev