Description
What happened?
When a Service is changed from type LoadBalancer to another type, the update is not properly synchronized to the host cluster.
2025-04-30 08:00:17 ERROR controller/controller.go:341 Reconciler error {"component": "vcluster", "controller": "service", "namespace": "default", "name": "svc-test", "reconcileID": "ba7b75a0-ee77-483a-a00a-538bc9bccfef", "error": "sync: patch virtual object: update object status: Service \"svc-test\" is invalid: status.loadBalancer.ingress: Forbidden: may only be used when
spec.type is 'LoadBalancer'"}
What did you expect to happen?
I expected that after changing the Service type from LoadBalancer to another type (e.g., ClusterIP), the updated Service would be correctly synchronized to the host cluster, reflecting the new type and removing any LoadBalancer-related fields.
How can we reproduce it (as minimally and precisely as possible)?
- In the virtual cluster, create a Service of type LoadBalancer.
- Then, modify the Service and change its type to ClusterIP.
- The change will not be reflected in the host cluster.
Anything else we need to know?
No response
Host cluster Kubernetes version
1.30.3+
vcluster version
0.20.1
0.24.1
VCluster Config
use the default values.yaml in the chart