Issue: NFS Server Not Mounting on Agent Pod

We are experiencing an issue where the NFS server is running correctly, but the client pod defined in client-deployment.yaml is failing to start. Below are the details of each configuration file and the error logs, and i have attached the logs for nfs server

Error Logs
When attempting to run the client-deenter image description hereployment.yaml file, the pod fails to start with the following error logs:
Warning FailedMount 3m13s (x9 over 21m) kubelet MountVolume.SetUp failed for volume “nfs-volume” : mount failed: exit status 1
Mounting command: /home/kubernetes/containerized_mounter/mounter
Mounting arguments: mount -t nfs 34.118.233.16:/data /var/lib/kubelet/pods/6e602811-88b7-40d8-8e66-1e028dd0e919/volumes/kubernetes.ionfs/nfs-volume
Output: Mount failed: mount failed: exit status 32
Mounting command: chroot
Mounting arguments: [/home/kubernetes/containerized_mounter/rootfs mount -t nfs 34.118.233.16:/data /var/lib/kubelet/pods/6e602811-88b7-40d8-8e66-1e028dd0e919/volumes/kubernetes.ionfs/nfs-volume]
Output: mount.nfs: Connection timed out

Configuration Files
nfs-server.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs4-web
spec:
replicas: 1
selector:
matchLabels:
app: nfs-server
template:
metadata:
labels:
app: nfs-server
spec:
initContainers:

  • name: init-modules
    image: busybox
    command: [“/bin/sh”, “-c”, “modprobe nfs && modprobe nfsd && modprobe rpcsec_gss_krb5”]
    securityContext:
    privileged: true
    volumeMounts:
  • name: modules
    mountPath: /lib/modules
    readOnly: true
    volumes:
  • name: data
    gcePersistentDisk:
    pdName: gce-nfs-disk
    fsType: ext4
  • name: modules
    hostPath:
    path: /lib/modules
    containers:
  • name: server
    image: erichough/nfs-server
    imagePullPolicy: IfNotPresent
    securityContext:
    privileged: true
    volumeMounts:
  • mountPath: /data
    name: data
  • mountPath: /lib/modules
    name: modules
    env:
  • name: NFS_DISABLE_VERSION_3
    value: “yes”
  • name: NFS_LOG_LEVEL
    value: DEBUG
  • name: NFS_SERVER_THREAD_COUNT
    value: “6”
  • name: NFS_EXPORT_0
    value: /data *(rw,sync,fsid=0,crossmnt,no_subtree_check,no_root_squash)

nfs-pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv
spec:
capacity:
storage: 10Gi
accessModes:

  • ReadWriteMany
    nfs:
    server: 34.118.233.16
    path: /data
    persistentVolumeReclaimPolicy: Retain
    storageClassName: nfs-storage-class

nfs-pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
accessModes:

  • ReadWriteMany
    resources:
    requests:
    storage: 2Gi
    storageClassName: nfs-storage-class
    volumeName: nfs-pv

client-deployment.yaml

apiVersion: v1
kind: Pod
metadata:
name: nfs-test-pod
spec:
containers:

name: nfs-test-container
image: busybox
command: [“sleep”, “3600”]
volumeMounts:
mountPath: /mnt/nfs
name: nfs-volume
volumes:
name: nfs-volume
nfs:
server: 34.118.226.147 # Replace with the IP address of your NFS server
path: /data
readOnly: false
Please investigate why the NFS server is not mounting on the client pod and provide any possible solutions or workarounds. Thank you!

enter image description here](https://i.sstatic.net/id002mj8.jpg)ployment.yaml file, the pod fails to start with the following error logs:
Warning FailedMount 3m13s (x9 over 21m) kubelet MountVolume.SetUp failed for volume “nfs-volume” : mount failed: exit status 1
Mounting command: /home/kubernetes/containerized_mounter/mounter
Mounting arguments: mount -t nfs 34.118.233.16:/data /var/lib/kubelet/pods/6e602811-88b7-40d8-8e66-1e028dd0e919/volumes/kubernetes.ionfs/nfs-volume
Output: Mount failed: mount failed: exit status 32
Mounting command: chroot
Mounting arguments: [/home/kubernetes/containerized_mounter/rootfs mount -t nfs 34.118.233.16:/data /var/lib/kubelet/pods/6e602811-88b7-40d8-8e66-1e028dd0e919/volumes/kubernetes.ionfs/nfs-volume]
Output: mount.nfs: Connection timed out

Configuration Files
nfs-server.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nfs4-web
spec:
replicas: 1
selector:
matchLabels:
app: nfs-server
template:
metadata:
labels:
app: nfs-server
spec:
initContainers:

  • name: init-modules
    image: busybox
    command: [“/bin/sh”, “-c”, “modprobe nfs && modprobe nfsd && modprobe rpcsec_gss_krb5”]
    securityContext:
    privileged: true
    volumeMounts:
  • name: modules
    mountPath: /lib/modules
    readOnly: true
    volumes:
  • name: data
    gcePersistentDisk:
    pdName: gce-nfs-disk
    fsType: ext4
  • name: modules
    hostPath:
    path: /lib/modules
    containers:
  • name: server
    image: erichough/nfs-server
    imagePullPolicy: IfNotPresent
    securityContext:
    privileged: true
    volumeMounts:
  • mountPath: /data
    name: data
  • mountPath: /lib/modules
    name: modules
    env:
  • name: NFS_DISABLE_VERSION_3
    value: “yes”
  • name: NFS_LOG_LEVEL
    value: DEBUG
  • name: NFS_SERVER_THREAD_COUNT
    value: “6”
  • name: NFS_EXPORT_0
    value: /data *(rw,sync,fsid=0,crossmnt,no_subtree_check,no_root_squash)

nfs-pv.yaml

apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv
spec:
capacity:
storage: 10Gi
accessModes:

  • ReadWriteMany
    nfs:
    server: 34.118.233.16
    path: /data
    persistentVolumeReclaimPolicy: Retain
    storageClassName: nfs-storage-class

nfs-pvc.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc
spec:
accessModes:

  • ReadWriteMany
    resources:
    requests:
    storage: 2Gi
    storageClassName: nfs-storage-class
    volumeName: nfs-pv

client-deployment.yaml

apiVersion: v1
kind: Pod
metadata:
name: nfs-test-pod
spec:
containers:

name: nfs-test-container
image: busybox
command: [“sleep”, “3600”]
volumeMounts:
mountPath: /mnt/nfs
name: nfs-volume
volumes:
name: nfs-volume
nfs:
server: 34.118.226.147 # Replace with the IP address of your NFS server
path: /data
readOnly: false
Please investigate why the NFS server is not mounting on the client pod and provide any possible solutions or workarounds. Thank you!

New contributor

Rakesh Pandey is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật