存储卷

  同一个pod内的所有容器共享存储 网络 用户等空间     pod内的容器都是以pause镜像为基础镜像来运行的
   k8s.gcr.io/pause 3.1 da86e6ba6ca1 17 mon 742 kB

emptyDir
     临时存储目录 pod删除 存储卷也随即会被删除

hostPath 主机目录
     pod所在主机上的目录

搭建NFS网络存储

nfs搭建
   yum install nfs-utils
   mkdir -pv /data/volumes
   vi /etc/exports
     /data/volumes 192.168.11.0/16(rw,no_root_squash)
   systemctl start nfs
  1.确保k8s集群中的所有节点都能驱动nfs 
    yum install nfs-utils
  2.[root@node2 ~]# mount -t nfs 192.168.11.157:/data/volumnes/ /mnt
mount.nfs: access denied by server while mounting 192.168.11.157:/data/volumnes/
  3.在nfs服务器查看/var/log/messages查看 volumnes单词拼写错误

  [root@node2 ~]# mount -t nfs 192.168.11.157:/data/volumes  /mnt

  [root@localhost ~]# vi /etc/exports
   /data/volumes/ 192.168.11.0/16(insecure,rw,async,no_root_squash)

  [root@localhost ~]# exportfs -r
  exportfs: Invalid prefix `24*' for 192.168.11.0/24*
  [root@localhost ~]# showmount -e
  Export list for localhost.localdomain:
  /data/volumes 192.168.11.0/16
nfs搭建

相关文章:

  • 2022-01-10
  • 2021-06-05
  • 2022-12-23
  • 2021-12-06
  • 2021-12-22
  • 2022-12-23
  • 2021-01-27
  • 2021-12-08
猜你喜欢
  • 2021-06-12
  • 2022-01-18
  • 2020-06-06
  • 2021-12-26
  • 2021-09-12
  • 2022-12-23
  • 2021-11-04
相关资源
相似解决方案