首页 > 其他 > 详细

创建NFS类型storageclass、pv、pvc

时间:2021-02-07 18:37:42      阅读:32      评论:0      收藏:0      [点我收藏+]
  1. 创建Storageclass

 

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storage.resource.caicloud.io/alias: nfs
    storage.resource.caicloud.io/app-ids: ""
    storage.resource.caicloud.io/app-names: ""
    storage.resource.caicloud.io/description: ""
    storage.resource.caicloud.io/process: "true"
    storage.resource.caicloud.io/service: "nfs-20210204034030-fa5b54"
    storage.resource.caicloud.io/storageclass-quota: ‘{"persistentvolumeclaims":"100","requests.storage":"100Gi"}‘
    storage.resource.caicloud.io/type: nfs
  finalizers:
  - storage.resource.caicloud.io/storageclass-deletion
  name: manual
parameters:
  exportPath: /id114878_vol1001_prd
  server: 192.168.1.1
  mountOptions: "vers=3.0,nfsvers=3"
mountOptions:
  - vers=3.0
  - nfsvers=3
provisioner: caicloud.io/nfs
reclaimPolicy: Delete
volumeBindingMode: Immediate

 

 

  1. 创建PV/PVC
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-cimb-sit2
spec:
  storageClassName: manual
  capacity:
    storage: 100Gi
  accessModes:
    - ReadWriteMany
  persistentVolumeReclaimPolicy: Retain
  nfs:
    path: /id114878_vol1001_prd
    server: 192.168.1.1
    readOnly: false


---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-cimb-sit2
  namespace: poc-hk
spec:
  accessModes:
  - ReadWriteMany
  storageClassName: manual
  resources:
    requests:
      storage: 100Gi

 

创建NFS类型storageclass、pv、pvc

原文:https://www.cnblogs.com/chase2020/p/14386020.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!