Unable to use persistent volume mounts Azure Kubernetes
I try to bind a volume to rabbit mq
volumes:
- name: rabbitmq-data
persistentVolumeClaim:
claimName: rabbitmq-pvc-new
volumeMounts:
- name: rabbitmq-data
mountPath: /var/lib/rabbitmq
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rabbitmq-pvc-new
spec:
accessModes:
- ReadWriteOnce
storageClassName: managed-csi
resources:
requests:
storage: 1Gi
On Azure I see that the pvc is bound:
One important thing: my node is only running in Zone 2. This may be the reason, but I'm not sure.
The pod stays in a ContainerCreating state. With this message:
Normal Scheduled 65s default-scheduler Successfully assigned default/rabbitmq to aks-agentpool
Normal SuccessfulAttachVolume 51s attachdetach-controller AttachVolume.Attach succeeded for volume "pvc-01"
Warning FailedMount 11s (x7 over 50s) kubelet MountVolume.MountDevice failed for volume "pvc-01" : rpc error: code = Internal desc = failed to find disk on lun 0. azureDisk - findDiskByLun(0) failed with error(failed to find disk by lun 0)