Persistent Volumes API
List Kubernetes persistent volume claims with storage class, capacity, access modes, and per-volume cost details via the Kubeadapt API.
The persistent volumes endpoint returns storage details and cost data for PersistentVolumeClaims across your clusters.
Required scope: persistent_volumes:read
List Persistent Volumes
text
GET /v1/persistent-volumesReturns a paginated list of persistent volumes across your organization.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
cluster_id | string | Filter by cluster ID | |
namespace | string | Filter by namespace | |
storage_class | string | Filter by storage class name | |
limit | integer | 100 | Number of results to return (1 to 500) |
offset | integer | 0 | Number of results to skip |
Example Request
bash
curl -H "Authorization: Bearer ka_your_api_key" \
"https://public-api.kubeadapt.io/v1/persistent-volumes?cluster_id=cls-abc123&storage_class=gp3"Example Response
json
{
"persistent_volumes": [
{
"id": "pv-abc001",
"name": "data-postgres-0",
"cluster_id": "cls-abc123",
"cluster_name": "prod-us-east",
"namespace": "production",
"pvc_name": "data-postgres-0",
"storage_class": "gp3",
"capacity_gb": 100.0,
"access_modes": ["ReadWriteOnce"],
"volume_type": "gp3",
"zone": "us-east-1a",
"hourly_cost": 0.011
},
{
"id": "pv-abc002",
"name": "data-redis-0",
"cluster_id": "cls-abc123",
"cluster_name": "prod-us-east",
"namespace": "production",
"pvc_name": "data-redis-0",
"storage_class": "gp3",
"capacity_gb": 20.0,
"access_modes": ["ReadWriteOnce"],
"volume_type": "gp3",
"zone": "us-east-1a",
"hourly_cost": 0.0022
}
],
"total": 18,
"summary": {
"total_capacity_gb": 1240.0,
"total_hourly_cost": 0.1364
}
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Persistent volume identifier |
name | string | PersistentVolume name |
cluster_id | string | Cluster this volume belongs to |
cluster_name | string | Cluster display name |
namespace | string | Kubernetes namespace |
pvc_name | string | PersistentVolumeClaim name bound to this volume |
storage_class | string | Kubernetes storage class |
capacity_gb | float | Provisioned capacity in GB |
access_modes | array | Kubernetes access modes (e.g., ["ReadWriteOnce"], ["ReadWriteMany"]) |
volume_type | string | Underlying volume type (e.g., gp3, io1) |
zone | string | Availability zone where the volume is provisioned |
hourly_cost | float | Estimated hourly cost in USD |
Summary Fields
The summary object in the response contains aggregate totals for the filtered result set:
| Field | Type | Description |
|---|---|---|
total_capacity_gb | float | Total provisioned storage in GB |
total_hourly_cost | float | Total hourly cost across all returned volumes |
Related
- Namespaces - Namespace-level resource data
- Clusters - Cluster-level cost data