云容器实例 CCI-导入存储:请求消息

时间:2025-02-12 14:55:26

请求消息

请求参数

表2 PersistentVolumeClaim v1 数据结构说明

参数

是否必选

参数类型

描述

apiVersion

Yes

String

APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.

kind

Yes

String

Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated.

metadata

Yes

Object

Standard object's metadata. 详情请参见表10

其中annotations字段请参见表3

spec

Yes

Object

Spec defines the desired characteristics of a volume requested by a pod author. 详情请参见表177

status

No

Object

Status represents the current information/status of a persistent volume claim. Read-only. 详情请参见表178

表3 metadata.annotations字段说明

参数

是否必选

参数类型

描述

fsType

Yes

String

文件系统名称。可设置为:

  • 块存储:ext4
  • 对象存储: obs
  • 文件存储、极速文件存储: nfs

volumeID

Yes

String

卷id。

deviceMountPath

No

String

共享路径。

说明:

只有文件存储卷和极速文件存储卷需要设置该值。

请求示例

{    "apiVersion": "v1",    "kind": "PersistentVolumeClaim",    "metadata": {        "annotations": {            "fsType": "nfs",            "volumeID": "378dfa73-3ae4-4179-81c0-67699976b505",            "deviceMountPath": "sfs-nas01.cn-north-4b.myhuaweicloud.com:/share-84b38e4d"        },        "name": "cci-sfs-jxre8q80-ylpd",        "namespace": "test-namespace"    },    "spec": {        "resources": {            "requests": {                "storage": "10Gi"            }        },        "storageClassName": "nfs-rw"    }}
support.huaweicloud.com/api-cci/cci_02_2021.html