Longhorn created replicas even though we created storage class like Longhorn without replication storage class


We don’t want replicas for couple of components like CMDB, kafka due to these component will maintain their own backup. Hence, we don’t want to use replicas. We created a without replicas storage class and mapped to respective component. but it is still showing default replicas count i.e. 3. Is there way to use change replicas count for specific components than global level.
As shown below:

allowVolumeExpansion: true
apiVersion: storage.k8s.io/v1
kind: StorageClass
storageclass.kubernetes.io/is-default-class : "false"
name: longhorn-without-replication
resourceVersion: “” parameters: baseImage: “” fromBackup: “” numberOfReplicas: “0” staleReplicaTimeout: “30” provisioner: driver.longhorn.io reclaimPolicy: Delete volumeBindingMode: Immediate`

But it is maintain 3 replicas as default.

Is there any way to keep zero replicas for specific components instead of all.


Longhorn Replica is where the data is stored. You need to set it to 1 in your case, this means Longhorn will have a single copy of the data.