-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement]I modified the service type to LoadBalancer, but it reverts back to its original type #8398
Comments
HI @decaMinCow , |
When I modify the service type of MySQL to LoadBalancer, the change reverts back. However, for the Redis service, the service type is successfully set to LoadBalancer and persists. I am unsure why this behavior is different between the two services. Below is the YAML configuration for the Redis cluster where the service type is changing as expected:
|
And I reproduced this on KB 091. apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
name: laurel38
namespace: test
spec:
clusterDefinitionRef: apecloud-mysql
clusterVersionRef: ac-mysql-8.0.30
componentSpecs:
- componentDefRef: mysql
disableExporter: true
name: mysql
replicas: 1
resources:
limits:
cpu: "0.5"
memory: 0.5Gi
requests:
cpu: "0.5"
memory: 0.5Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
terminationPolicy: Delete |
KubeBlocks: 0.9.2-beta.10
|
the generated redis svc for sentinal is apiVersion: v1
kind: Service
metadata:
creationTimestamp: "2024-11-05T08:04:21Z"
finalizers:
- component.kubeblocks.io/finalizer
labels:
app.kubernetes.io/instance: redis-cluster
app.kubernetes.io/managed-by: kubeblocks
apps.kubeblocks.io/component-name: redis-sentinel
name: redis-cluster-redis-sentinel-redis-sentinel
namespace: default
ownerReferences:
- apiVersion: apps.kubeblocks.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: Component
name: redis-cluster-redis-sentinel
uid: 20e49f65-0981-44c3-b745-9d28056e4e81
resourceVersion: "27493"
uid: 29b87f4d-ab52-47c1-813f-412f8117fd72
spec:
allocateLoadBalancerNodePorts: true
clusterIP: 10.96.114.45
clusterIPs:
- 10.96.114.45
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- name: redis-sentinel
nodePort: 32035
port: 26379
protocol: TCP
targetPort: redis-sentinel
selector:
app.kubernetes.io/instance: redis-cluster
app.kubernetes.io/managed-by: kubeblocks
apps.kubeblocks.io/component-name: redis-sentinel
sessionAffinity: None
type: LoadBalancer
status:
loadBalancer: {} |
I am encountering an issue where, after changing the Kubernetes service type to LoadBalancer, it keeps reverting to the previous service type. I am unable to persist the change.
The text was updated successfully, but these errors were encountered: