8-3 持久化存储PersistantVolume

持久化存储PersistantVolume

将NFS 拆分成若干块隔离的存储

[root@master Chapter8]# cat 8-3-pv.yaml 
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-demo
  labels:
    name: pv-demo
spec:
  capacity:
    storage: 5Gi
  accessModes:
    - ReadWriteOnce
  persistentVolumeReclaimPolicy: Recycle
  nfs:
    path: /nfsdata
    server: master
    
[root@master ~]# kubectl get pv
NAME       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM               STORAGECLASS       REASON   AGE
datadir1   5Gi        RWO            Retain           Bound       default/www-web-0   my-storage-class            3d23h
datadir2   5Gi        RWO            Retain           Bound       default/www-web-1   my-storage-class            3d23h
datadir3   5Gi        RWO            Retain           Bound       default/www-web-2   my-storage-class            3d23h

上一篇:Storm实时计算网站pv


下一篇:记曾经日3亿PV时Nginx负载均衡配置