---
title: "更新PVC"
method: PUT
path: "/k8s/cluster/{id}/namespaces/{namespaceName}/pvcs/{pvcName}"
tags: ["K8s存储管理-PVC"]
---

# 更新PVC

`PUT /k8s/cluster/{id}/namespaces/{namespaceName}/pvcs/{pvcName}`

更新指定的PVC配置

## Path parameters

- `id` integer, required
- `namespaceName` string, required
- `pvcName` string, required

## Headers

- `Authorization` string, required

## Request body

- ModelUpdatePVCRequest
  - `labels` object — 标签
  - `resources` ModelPVCResourcesSpec
    - `limits` object — 资源限制
    - `requests` object, required — 资源请求

## Response `200`

OK

- object
  - `code` integer — 状态码
  - `data` object — 返回的数据
    - `accessModes` string[] — 访问模式
    - `capacity` string — 总量
    - `createdAt` string — 创建时间
    - `labels` object — 标签
    - `name` string — PVC名称
    - `namespace` string — 命名空间
    - `status` string — 状态 Pending/Bound/Lost
    - `storageClass` string — 存储类型
    - `volumeMode` string — 卷模式 Filesystem/Block
    - `volumeName` string — 关联的存储卷
  - `message` string — 提示信息

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opsre/apis/devops.md) · [All operations](https://skmtc.net/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
