Start a Conversation

Unsolved

A

1 Message

1918

February 17th, 2022 21:00

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:

Events:
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:
Provisioner: csi-powerstore.dellemc.com
Parameters: fstype=nfs,readOnly=false,server=192.168.31.100
AllowVolumeExpansion:
MountOptions:
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events:
[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:
Annotations: pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
volume.beta.kubernetes.io/storage-provisioner: csi-powerstore.dellemc.com
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 17Gi
Access Modes: RWO
VolumeMode: Filesystem
Used By: powerstore-pod-nfs
Events:
[root@amd-csah core]#

-----------------------------------------

3) created POD.

----------------------------------------

[root@amd-csah core]# cat powerstore-nfs-pod.yaml
apiVersion: v1
kind: Pod
metadata:
name: powerstore-pod-nfs
namespace: powerstore
spec:
containers:
- name: nfs-container
image: quay.io/centos/centos
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/mnt"
name: nfs
- mountPath: "/tmp"
name: confmap
command: ["/bin/bash", "-c", "cp /tmp/keys /mnt/keys && sleep 2000000000"]
volumes:
- name: nfs
persistentVolumeClaim:
claimName: powerstore-nfs-pvc
- name: confmap
configMap:
name: powerstore-configmap-nfs
items:
- 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.

 

 

 

166 Posts

February 28th, 2022 07:00

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 : https://dellemccsm.slack.com/

If you need an invite you can ask for it here : http://del.ly/Slack_request

There is a broader audience to answer your question.

 

Thanks !

No Events found!

Top