Setup a NFS server in one of the node of Kubernetes Cluster using rhel 7.X
--------------------------------------------------------------------
$ yum update
$ rpm -qa | grep nfs-utils
$ yum install nfs-utils rpcbind
$ systemctl enable nfs-server
$ systemctl enable rpcbind
$ systemctl enable nfs-lock
$ systemctl enable nfs-idmap
$ systemctl start rpcbind
$ systemctl start nfs-server
$ systemctl start nfs-lock
$ systemctl start nfs-idmap
$ systemctl status nfs
$ mkdir /tecnotree
$ chmod 1777 /tecnotree
$ vi /etc/exports
------------------
/tecnotree *(rw)
exportfs -r
systemctl restart nfs-server
showmount -e
Validate NFS server is working Manually
--------------------------------------------------------------------
rpm -qa | grep nfs-utils
yum install nfs-utils
mkdir /tmp/mylocal
sudo mount -t nfs -o ro,nosuid 172.31.26.152:/tecnotree /tmp/mylocal
mkdir /tmp/mylocal1
sudo mount -t nfs -o rw,nosuid 172.31.26.152:/tecnotree /tmp/mylocal1
vi /etc/fstab
172.31.26.152:/tecnotree /tmp/mylocal nfs ro,nosuid 0 0
172.31.26.152:/tecnotree /tmp/mylocal1 nfs rw,nosuid 0 0Code language: JavaScript (javascript)
Using NFS server in Kubernetes Pods
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals