5

K8S离线部署笔记-8-NFS服务

 2 years ago
source link: https://blog.bluexiii.com/202009/K8S%E7%A6%BB%E7%BA%BF%E9%83%A8%E7%BD%B2%E7%AC%94%E8%AE%B0-8-NFS%E6%9C%8D%E5%8A%A1/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

K8S离线部署笔记-8-NFS服务

Posted on

2020-09-28 Edited on 2021-01-05

# 安装
yum -y install nfs-utils
rpcinfo -p localhost

# 创建共享目录
mkdir /nfs

# 修改配置
cat <<EOF > /etc/exports
/nfs *(rw,sync,no_root_squash,no_subtree_check)
EOF

# 使配置生效
exportfs -r

# 启用服务
systemctl enable rpcbind
systemctl start rpcbind
systemctl enable nfs-server
systemctl start nfs-server

# 测试挂载
showmount -e localhost
mkdir /mnt/nfs
mount -t nfs 127.0.0.1:/nfs /mnt/nfs

# 安装
yum -y install nfs-utils

# 启用服务
systemctl enable rpcbind
systemctl start rpcbind

# 临时挂载
showmount -e 10.10.51.77
mkdir /mnt/nfs
mount -t nfs 10.10.51.77:/nfs /mnt/nfs

# 永久挂载
sudo vi /etc/fstab
10.10.51.77:/nfs /data nfs defaults 0 0

systemctl daemon-reload
mount

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK