<p>RabbitMQ cluster operator does not work in Kubernetes.<br />
I have a kubernetes cluster 1.17.17 of 3 nodes. I deployed it with a rancher.
According to this instruction I installed RabbitMQ cluster-operator:
<a href="https://www.rabbitmq.com/kubernetes/operator/quickstart-operator.html" rel="nofollow noreferrer">https://www.rabbitmq.com/kubernetes/operator/quickstart-operator.html</a><br />
<code>kubectl apply -f &quot;https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml&quot;</code><br />
Its ok! but..
I have created this very simple configuration for the instance according to the documentation:</p>
<pre><code>apiVersion: rabbitmq.com/v1beta1
kind: RabbitmqCluster
metadata:
  name: rabbitmq
  namespace: test-rabbitmq
</code></pre>
<p>I have error:error while running &quot;VolumeBinding&quot; filter plugin for pod &quot;rabbitmq-server-0&quot;: pod has unbound immediate PersistentVolumeClaims</p>
<p>after that i checked:<br />
<code>kubectl get storageclasses</code><br />
and saw that there were no resources! I added the following storegeclasses:</p>
<pre><code>kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
</code></pre>
<p>create pv and pvc:</p>
<pre><code>kind: PersistentVolume
apiVersion: v1
metadata:
  name: rabbitmq-data-sigma
  labels:
    type: local
  namespace: test-rabbitmq
  annotations:
    volume.alpha.kubernetes.io/storage-class: rabbitmq-data-sigma
spec:
  storageClassName: local-storage
  capacity:
    storage: 3Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Recycle
  hostPath:
    path: &quot;/opt/rabbitmq-data-sigma&quot;
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: rabbitmq-data
  namespace: test-rabbitmq
spec:
  storageClassName: local-storage
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 3Gi
</code></pre>
<p>I end up getting an error in the volume - which is being generated automated:
<a href="https://i.stack.imgur.com/MhUST.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MhUST.png" alt="enter image description here" /></a></p>
<pre><code>FailedBinding   no persistent volumes available for this claim and no storage class is set  
</code></pre>
<p>please help to understand this problem!</p>

Le0n
<p>You can configure <a href="https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/" rel="nofollow noreferrer">Dynamic Volume Provisioning</a> e.g. <strong>Dynamic NFS provisioning</strong> as describe in this <a href="https://medium.com/@myte/kubernetes-nfs-and-dynamic-nfs-provisioning-97e2afb8b4a9" rel="nofollow noreferrer">article</a> or you can manually create <code>PersistentVolume</code> ( it is <strong>NOT</strong> recommended approach).</p>
<p>I really recommend you to configure dynamic provisioning -
this will allow you to generate <code>PersistentVolumes</code> automatically.</p>
<h3>Manually creating PersistentVolume</h3>
<p>As I mentioned it isn't recommended approach but it may be useful when we want to check something quickly without configuring additional components.</p>
<p>First you need to create <code>PersistentVolume</code>:</p>
<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv
spec:
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  hostPath:
    path: /mnt/rabbitmq # data will be stored in the &quot;/mnt/rabbitmq&quot; directory on the worker node
    type: Directory
</code></pre>
<p>And then create the <code>/mnt/rabbitmq</code> directory on the node where the <code>rabbitmq-server-0</code> <code>Pod</code> will be running. In your case you have 3 worker node so it may difficult to determine where the <code>Pod</code> will be running.</p>
<p>As a result you can see that the <code>PersistentVolumeClaim</code> was bound to the newly created <code>PersistentVolume</code> and the <code>rabbitmq-server-0</code> <code>Pod</code> was created successfully:</p>
<pre><code># kubectl get pv,pvc -A
NAME                   CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM                                         STORAGECLASS   REASON   AGE
persistentvolume/pv    10Gi       RWO            Recycle          Bound    test-rabbitmq/persistence-rabbitmq-server-0                           11m


NAMESPACE       NAME                                                  STATUS   VOLUME   CAPACITY   ACCESS MODES   STORAGECLASS   AGE
test-rabbitmq   persistentvolumeclaim/persistence-rabbitmq-server-0   Bound    pv       10Gi       RWO                           11m

# kubectl get pod -n test-rabbitmq
NAME                READY   STATUS    RESTARTS   AGE
rabbitmq-server-0   1/1     Running   0          11m
</code></pre>
