Reading Imported PVCs
Function
This API is used to query PVCs under a specified namespace.
URI
GET /api/v1/namespaces/{namespace}/extended-persistentvolumeclaims
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
namespace |
Yes |
String |
Namespace for which PVCs are to be queried. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
storageType |
No |
String |
Type of storage. The options are as follows:
|
Request
N/A
Response
Response parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
PersistentVolumeClaim |
Object |
For details, see Table 175. |
|
PersistentVolume |
Object |
For details, see Table 184. |
|
StorageInfo |
Object |
For details, see Table 199. |
Example response
[
{
"persistentVolumeClaim": {
"metadata": {
"name": "cci-evs-jxzqegxe-k1z3",
"namespace": "test-namespace",
"selfLink": "/api/v1/namespaces/csms/persistentvolumeclaims/cci-evs-jxzqegxe-k1z3",
"uid": "e82c1574-a46d-11e9-be8a-b44326d0c915",
"resourceVersion": "65003551",
"creationTimestamp": "2019-07-12T06:25:56Z",
"annotations": {
"pv.kubernetes.io/bind-completed": "yes",
"pv.kubernetes.io/bound-by-controller": "yes",
"volume.beta.kubernetes.io/storage-provisioner": "flexvolume-huawei.com/fuxivol"
},
"finalizers": [
"kubernetes.io/pvc-protection"
],
"enable": true
},
"spec": {
"accessModes": [
"ReadWriteMany"
],
"resources": {
"requests": {
"storage": "10Gi"
}
},
"volumeName": "pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"storageClassName": "sata"
},
"status": {
"phase": "Bound",
"accessModes": [
"ReadWriteMany"
],
"capacity": {
"storage": "10Gi"
}
}
},
"persistentVolume": {
"metadata": {
"name": "pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"selfLink": "/api/v1/persistentvolumes/pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"uid": "eb0a0ca1-a46d-11e9-be8a-b44326d0c915",
"resourceVersion": "65003549",
"creationTimestamp": "2019-07-12T06:26:01Z",
"labels": {
"tenant.kubernetes.io/domain-id": "f0c61dbd65974140956ed37a91ea860f",
"tenant.kubernetes.io/project-id": "cdb4249297a44665a63eec4f27ad09bf"
},
"annotations": {
"kubernetes.io/createdby": "huawei.com/fuxivol-dynamic-provisioner",
"pv.kubernetes.io/bound-by-controller": "yes",
"pv.kubernetes.io/namespace": "test-namespace",
"pv.kubernetes.io/provisioned-by": "flexvolume-huawei.com/fuxivol",
"tenant.kubernetes.io/domain-id": "f0c61dbd65974140956ed37a91ea860f",
"tenant.kubernetes.io/project-id": "cdb4249297a44665a63eec4f27ad09bf"
},
"finalizers": [
"kubernetes.io/pv-protection"
]
},
"spec": {
"capacity": {
"storage": "10Gi"
},
"flexVolume": {
"driver": "huawei.com/fuxivol",
"fsType": "ext4",
"options": {
"fsType": "ext4",
"volumeID": "06e10708-6412-4190-8496-f9531fb5fd0c"
}
},
"accessModes": [
"ReadWriteMany"
],
"claimRef": {
"kind": "PersistentVolumeClaim",
"namespace": "test-namespace",
"name": "cci-evs-jxzqegxe-k1z3",
"uid": "e82c1574-a46d-11e9-be8a-b44326d0c915",
"apiVersion": "v1",
"resourceVersion": "65003516"
},
"persistentVolumeReclaimPolicy": "Delete",
"storageClassName": "sata"
},
"status": {
"phase": "Bound"
}
},
"storageInfo": {
"kind": "Volume",
"apiVersion": "paas/v1beta1",
"metadata": {
"name": "pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"creationTimestamp": "2019-07-12T06:25:56Z",
"labels": {
"__system__volume_name": "pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"hw:passthrough": "true",
"kubernetes.io/namespace": "test-namespace",
"tenant.kubernetes.io/domain-id": "f0c61dbd65974140956ed37a91ea860f",
"tenant.kubernetes.io/project-id": "cdb4249297a44665a63eec4f27ad09bf"
}
},
"spec": {
"name": "pvc-e82c1574-a46d-11e9-be8a-b44326d0c915",
"size": 10,
"inresourcepool": false,
"availability_zone": "cn-north-1a",
"volume_type": "sata",
"multiattach": true,
"access": {
"": {
"access_type": "",
"access_to": "",
"access_level": "",
"id": "",
"state": ""
}
},
"vpc_id": ""
},
"status": {
"id": "06e10708-6412-4190-8496-f9531fb5fd0c",
"status": "available",
"created_at": "2019-07-12T06:25:56Z",
"attachments": null,
"app_info": null
}
}
}
]
Status Code
|
Status Code |
Description |
|---|---|
|
200 |
The query is successful and the result is returned. |
For more status codes, see Status Codes.
Last Article: Importing a Storage Device
Next Article: Unbinding a Storage Device
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.