> For the complete documentation index, see [llms.txt](https://bohans.gitbook.io/devops/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bohans.gitbook.io/devops/kubernetes/ji-chu-zhi-shi/kubernetes-cun-chu/persistentvolumeclaim-pvc.md).

# PersistentVolumeClaim（PVC）

<mark style="color:blue;">**持久卷申领（PersistentVolumeClaim，PVC） 表达的是用户对存储的请求**</mark>。概念上与 Pod 类似：&#x20;

* Pod 会耗用节点资源，而 PVC 申领会耗用 PV 资源
* Pod 可以请求特定数量的资源（CPU 和内存）；同样 PVC 申领也可以请求特定的大小和访问模式 （例如，可以要求 PV 卷能够以 ReadWriteOnce、ReadOnlyMany 或 ReadWriteMany 模式之一来挂载）

<mark style="color:blue;">**在实际使用时，虽然用户通过PVC获取存储支持，但是用户可能需要具有不同性质的PV来解决不同的问题**</mark>，比如使用SSD硬盘来提高性能。所以<mark style="color:blue;">**集群管理员需要根据不同的存储后端来提供各种PV，而不仅仅是大小和访问模式的区别**</mark>，并且<mark style="color:blue;">**无须让用户了解这些卷的具体实现方式和存储类型，达到了存储的解藕，降低了存储使用的复杂度。**</mark>

{% hint style="warning" %}

## 注意：

* <mark style="color:orange;">**PVC和PV进行绑定的前提条件是一些参数必须匹配，比如accessModes、storageClassName、volumeMode都需要相同**</mark>
* <mark style="color:orange;">**并且PVC的storage需要小于等于PV的storage配置**</mark>
  {% endhint %}
