My Env: kubernetes:1.20.0 glusterfs-server-6.10-1.el7.x86_64 heketi-8.0.0-1.el7.x86_64 heketi-client-8.0.0-1.el7.x86_64

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: gluster-heketi-storageclass
provisioner: kubernetes.io/glusterfs
reclaimPolicy: Retain
parameters:
  resturl: "http://1xxxxxxx:18080"
  restauthenabled: "true"
  restuser: "admin"
  secretName: "heketi-secret"
  secretNamespace: "default"
  #volumetype: "none"
  volumetype: "replicate:3"
  clusterid: "60d0c41c0b232906f90b528fbb58400a"
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: glusterfs-vol-pvc02
  namespace: default
spec:
  storageClassName: gluster-heketi-storageclass
  accessModes:
  - ReadWriteMany
  resources:
    requests:
      storage: 10Gi

kubectl describe pvc glusterfs-vol-pvc02

 Failed to provision volume with StorageClass "gluster-heketi-storageclass": failed to create volume: failed to create volume: see kube-controller-manager.log for details
1

There are 1 best solutions below

1
On

I had a similar error. Connectivity between glusterfs nodes has been broken. Run

gluster peer status 

command and check the /etc/hosts file on all glusterfs nodes. In my case, the hosts file lacked the necessary information and not all nodes could communicate with each other.