"0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims" error using microk8s

166 Views Asked by At

by using the helm chart of emqx operator(https://github.com/emqx/emqx-operator) and going to follow their guide (https://github.com/emqx/emqx-operator/blob/main/docs/en_US/tasks/configure-emqx-persistence.md) on how to set data persistence I get the error given in the following question.

I did exactly as described in the guide, but precisely I get the error reported in relation to emqx-core.

Moreover, By doing:

kubectl get sc

I get the following output:

NAME    PROVISIONER    RECLAIMPOLICY    VOLUMEBINDINGMODE    ALLOWVOLUMEEXPANSION
microk8s-hostpath (default)   microk8s.io/hostpath   Delete   WaitForFirstConsumer   false

Note: I use the APIVersion apps.emqx.io/v2alpha1

1

There are 1 best solutions below

0
饶小力 On BEST ANSWER
apiVersion: apps.emqx.io/v2alpha1
kind: EMQX
metadata:
  name: emqx
spec:
  image: emqx:5.0
  coreTemplate:
    spec:
      volumeClaimTemplates:
        storageClassName: microk8s-hostpath
        resources:
          requests:
            storage: 20Mi
        accessModes:
        - ReadWriteOnce
      replicas: 3

You can try the above yaml configuration.