-
Notifications
You must be signed in to change notification settings - Fork 275
Description
Created nfs-csi class:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
server: 192.168.10.250
share: /volume1/k8s_share/
reclaimPolicy: Retain
volumeBindingMode: Immediate
allowVolumeExpansion: true
mountOptions:
- hard
- nfsvers=3
Checking the creation of the nfs-csi class:
kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
nfs-csi nfs.csi.k8s.io Retain Immediate true 5h36m
Created pvc topo-tiles-api-service-topo-pvc:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app.kubernetes.io/managed-by: Helm
name: topo-tiles-api-service-topo-pvc
namespace: bai
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 8Gi
storageClassName: nfs-csi
Checking the creation of the pvc topo-tiles-api-service-topo-pvc:
kubectl get pvc -n bai
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS VOLUMEATTRIBUTESCLASS AGE
topo-tiles-api-service-topo-pvc Pending nfs-csi 31m
kubectl describe pvc topo-tiles-api-service-topo-pvc -n bai
Name: topo-tiles-api-service-topo-pvc
Namespace: bai
StorageClass: nfs-csi
Status: Pending
Volume:
Labels: app.kubernetes.io/managed-by=Helm
Annotations: volume.beta.kubernetes.io/storage-provisioner: nfs.csi.k8s.io
volume.kubernetes.io/storage-provisioner: nfs.csi.k8s.io
Finalizers: [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode: Filesystem
Used By: topo-tiles-api-service-bai-service-5887889644-4g6nf
Events:
Type Reason Age From Message
Normal Provisioning 8m42s (x12 over 26m) nfs.csi.k8s.io_k8s-dev-05_e6c067b2-03f5-4db4-9fef-47d379854eb7 External provisioner is provisioning volume for claim "bai/topo-tiles-api-service-topo-pvc"
Warning ProvisioningFailed 8m32s (x12 over 26m) nfs.csi.k8s.io_k8s-dev-05_e6c067b2-03f5-4db4-9fef-47d379854eb7 failed to provision volume with StorageClass "nfs-csi": rpc error: code = Internal desc = failed to mount nfs server: rpc error: code = Internal desc = mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t nfs -o hard,nfsvers=3 192.168.10.250:/volume1/k8s_share/ /tmp/pvc-96b5cbfd-0293-414d-9e6d-78aea975bd71
Output: mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
Normal ExternalProvisioning 82s (x102 over 26m) persistentvolume-controller Waiting for a volume to be created either by the external provisioner 'nfs.csi.k8s.io' or manually by the system administrator. If volume creation is delayed, please verify that the provisioner is running and correctly registered.
To check on the local host, mount the nfs resource in the console:
sudo mount -t nfs -o hard,nfsvers=3 192.168.10.250:/volume1/k8s_share/ /mnt/
Checking:
sudo mount | grep 192.168.10.250
192.168.10.250:/volume1/k8s_share/ on /mnt type nfs (rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.10.250,mountvers=3,mountport=892,mountproto=udp,local_lock=none,addr=192.168.10.250)
Please tell me what the problem is, why is there no PVC connection?