Last reply by 02-28-2022 Unsolved
Start a Discussion
1 Copper
1 Copper

Kubernetes POD not able to mount NFS volume crated dynamically

Hello, I am trying to mount a dynamically created nfs volume (on Powerstore) on a kubernetes POD. Getting below error:

Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 5m17s default-scheduler Successfully assigned powerstore/powerstore-pod-nf s to amd-compute-02.dcws.lab
Normal SuccessfulAttachVolume 5m17s attachdetach-controller AttachVolume.Attach succeeded for volume "csi-psto re-70078bc833"
Warning FailedMount 3m13s kubelet MountVolume.MountDevice failed for volume "csi-pst ore-70078bc833" : rpc error: code = Aborted desc = pending
Warning FailedMount 72s (x2 over 3m14s) kubelet MountVolume.MountDevice failed for volume "csi-pst ore-70078bc833" : rpc error: code = DeadlineExceeded desc = context deadline exceeded
Warning FailedMount 59s (x2 over 3m14s) kubelet Unable to attach or mount volumes: unmounted volum es=[nfs], unattached volumes=[nfs confmap kube-api-access-n4n42]: timed out waiting for the condition


The process I followed is:

1) Created NFS storage class.


[root@amd-csah core]# oc describe sc powerstore-sc-nfs
Name: powerstore-sc-nfs
IsDefaultClass: No
Annotations: <none>
Parameters: fstype=nfs,readOnly=false,server=
AllowVolumeExpansion: <unset>
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events: <none>
[root@amd-csah core]#


2) Created PVC.


[root@amd-csah core]# oc describe pvc powerstore-nfs-pvc -n powerstore
Name: powerstore-nfs-pvc
Namespace: powerstore
StorageClass: powerstore-sc-nfs
Status: Bound
Volume: csi-pstore-70078bc833
Labels: <none>
Annotations: yes yes
Finalizers: []
Capacity: 17Gi
Access Modes: RWO
VolumeMode: Filesystem
Used By: powerstore-pod-nfs
Events: <none>
[root@amd-csah core]#


3) created POD.


[root@amd-csah core]# cat powerstore-nfs-pod.yaml
apiVersion: v1
kind: Pod
name: powerstore-pod-nfs
namespace: powerstore
- name: nfs-container
- containerPort: 80
name: "http-server"
- mountPath: "/mnt"
name: nfs
- mountPath: "/tmp"
name: confmap
command: ["/bin/bash", "-c", "cp /tmp/keys /mnt/keys && sleep 2000000000"]
- name: nfs
claimName: powerstore-nfs-pvc
- name: confmap
name: powerstore-configmap-nfs
- key: sample
path: keys
[root@amd-csah core]#


I can see the PV created on kubernetes cluster, on Powerstore also the volume is created, but kubelet is posting the mount failed error as mentioned above. ConfigMap is also created.

Need help in understanding what is going wrong.




Reply (1)
Dell Technologies

Hi @AbhimanyuRai,

We will need the logs of the controller driver to understand why the provisioning failed.

Do you mind connecting the slack channel for Container Storage Module here :

If you need an invite you can ask for it here :

There is a broader audience to answer your question.


Thanks !

Latest Solutions
Top Contributor