创建PVC

当前存储卷的类型仅支持SSD UDisk,SATA UDisk及UFS支持敬请期待。

创建StorageClass

storageclass.yml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: cloud
provisioner: archon.kubeup.com/ucloud
parameters:
  diskCategory: cloud_efficiency

暂不支持指定磁盘类型(默认SSD UDisk),付费方式默认按月;

创建一个存储卷声明并Mount到Pod

ds.yml
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: test-pvc-claim
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: cloud
  resources:
    requests:
      storage: 20Gi
 
---
apiVersion: v1
kind: Pod
metadata:
  name: nginx
spec:
  containers:
  - name: nginx
    image: nginx
    volumeMounts:
    - name: test
      mountPath: /data
    ports:
    - containerPort: 80
  volumes:
  - name: test
    persistentVolumeClaim:
      claimName: test-pvc-claim

备注:受UDisk产品限制,PVC最小为20GB,步长为10GB。

如有疑问请联系 技术支持