配置ack的nas storageclass

警告
本文最后更新于 2022-06-27 18:54,文中内容可能已过时。

主要是备忘,前提要有alicloud-nas-controller

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: alicloud-nas-devops
mountOptions:
- nolock,tcp,noresvport
- vers=4
parameters:
  server: xxx.xxx.nas.aliyuncs.com:/
  volumeAs: subpath
  archiveOnDelete: "true"
provisioner: alicloud/nas
reclaimPolicy: Delete
volumeBindingMode: Immediate

pvc测试

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  labels:
    app: test
  name: test
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: alicloud-nas-devops
  volumeMode: Filesystem
请我喝杯水
SoulChild 微信号 微信号
SoulChild 微信打赏 微信打赏
0%