A ReadWriteMany volume via the Piraeus NFS server is not created. The CSI controller may not change the ConfigMap in which it registers the NFS export for drbd-reactor.
Symptom
kubectl -n grafana get pvc gemeinsam Warning ProvisioningFailed … CreateVolume failed for pvc-b1e1d4c4-1a13-4aa3-ab7e-f7662d4390f6: unable to export: failed to update config map for export 'pvc-b1e1d4c4-1a13-4aa3-ab7e-f7662d4390f6': configmaps "linstor-csi-nfs-server-reactor-config" is forbidden: User "system:serviceaccount:piraeus-datastore:linstor-csi-controller" cannot update resource "configmaps" in API group "" in the namespace "piraeus-datastore"
The PVC stays Pending, and so do the pods that use it. The NFS server runs on all nodes at the same time.
Diagnosis
Which permissions does the CSI controller really have? The RWX rules are in its ClusterRole:
kubectl get clusterrole linstor-csi-controller -o jsonpath='{range .rules[*]}{.resources} {.verbs}{"\n"}{end}'
["configmaps"] ["get","patch"]
["services"] ["get","update"]
Causes
CSI too oldCSI v1.12 writes with update, the operator allows patch
Operator v2.12.1 grants the permissions for CSI v1.13 (get, patch). A CSI driver pinned to v1.12.0 tries an update and is rejected.
quay.io/piraeusdatastore/piraeus-csi:v1.13.2
Fix
kubectl -n piraeus-datastore get deploy linstor-csi-controller -o jsonpath='{.spec.template.spec.containers[?(@.name=="linstor-csi")].image}{"\n"}'
quay.io/piraeusdatastore/piraeus-csi:v1.13.2
kubectl -n grafana get pvc
Don't: Running CSI v1.13 against a LINSTOR controller 1.34 – CSI v1.13 requires the REST API of LINSTOR 1.35. The order is: LINSTOR first, then CSI.
k0s and LINSTOR hands-on, day 21: Grafana with Helm, the HA controller and ReadWriteMany over NFS – with measured outage times.
Go to day 21 →
FAQ
Do I need a separate StorageClass for RWX?
No. In the course the RWX PVC uses the same StorageClass linstor-replicated as Grafana; accessModes ReadWriteMany is enough once the NFS server is enabled.
How do I see which node carries the NFS export?
In linstor resource list that node shows InUse – not the node of the pods. The pods mount the volume via the service linstor-csi-nfs.