diff --git a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1.md b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1.md index 627873a128a..557df8a0eee 100644 --- a/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1.md +++ b/content/zh-cn/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1.md @@ -24,6 +24,7 @@ weight: 4 `import "k8s.io/api/core/v1"` ## PersistentVolumeClaim {#PersistentVolumeClaim} + @@ -37,27 +38,30 @@ PersistentVolumeClaim 是用户针对一个持久卷的请求和申领。 - **metadata** (}}">ObjectMeta) - + 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - **spec** (}}">PersistentVolumeClaimSpec) - + spec 定义 Pod 作者所请求的卷的预期特征。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - **status** (}}">PersistentVolumeClaimStatus) - + status 表示一个持久卷申领的当前信息/状态。只读。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#persistentvolumeclaims @@ -66,9 +70,11 @@ PersistentVolumeClaim 是用户针对一个持久卷的请求和申领。 PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes
- **accessModes** ([]string) + accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - **selector** (}}">LabelSelector) + selector is a label query over volumes to consider for binding. --> PersistentVolumeClaimSpec 描述存储设备的常用参数,并支持通过 source 来设置特定于提供商的属性。 @@ -76,12 +82,12 @@ PersistentVolumeClaimSpec 描述存储设备的常用参数,并支持通过 so
- **accessModes** ([]string) - + accessModes 包含卷应具备的预期访问模式。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#access-modes-1 - **selector** (}}">LabelSelector) - + selector 是在绑定时对卷进行选择所执行的标签查询。 - **resources** (ResourceRequirements) - + resources 表示卷应拥有的最小资源。 如果启用了 RecoverVolumeExpansionFailure 功能特性,则允许用户指定这些资源要求, 此值必须低于之前的值,但必须高于申领的状态字段中记录的容量。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#resources - - + + **ResourceRequirements 描述计算资源要求。** - **resources.claims** ([]ResourceClaim) - **集合:唯一值将在合并期间被保留** - + **集合:键 name 的唯一值将在合并期间被保留** + claims 列出了此容器使用的、在 spec.resourceClaims 中定义的资源的名称。 - + 这是一个 Alpha 字段,需要启用 DynamicResourceAllocation 特性门控。 - + 此字段是不可变的。 - **resources.limits** (map[string]}}">Quantity) - + limits 描述允许的最大计算资源量。更多信息: https://kubernetes.io/zh-cn/docs/concepts/configuration/manage-resources-containers/ - + - **resources.requests** (map[string]}}">Quantity) - + requests 描述所需的最小计算资源量。 - 如果针对容器省略 requests,则在显式指定的情况下默认为 limits,否则为具体实现所定义的值。更多信息: + 如果针对容器省略 requests,则在显式指定的情况下默认为 limits,否则为具体实现所定义的值。请求不能超过限制。更多信息: https://kubernetes.io/zh-cn/docs/concepts/configuration/manage-resources-containers/ - **volumeName** (string) - + volumeName 是对此申领所对应的 PersistentVolume 的绑定引用。 - **storageClassName** (string) - + storageClassName 是此申领所要求的 StorageClass 名称。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#class-1 - **volumeMode** (string) - + volumeMode 定义申领需要哪种类别的卷。当申领规约中未包含此字段时,意味着取值为 Filesystem。 - **dataSourceRef** (TypedObjectReference) - + dataSourceRef 指定一个对象,当需要非空卷时,可以使用它来为卷填充数据。 此字段值可以是来自非空 API 组(非核心对象)的任意对象,或一个 PersistentVolumeClaim 对象。 如果设置了此字段,则仅当所指定对象的类型与所安装的某些卷填充器或动态制备器匹配时,卷绑定才会成功。 @@ -287,7 +294,7 @@ PersistentVolumeClaimStatus 是持久卷申领的当前状态。
- **accessModes** ([]string) - + accessModes 包含支持 PVC 的卷所具有的实际访问模式。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#access-modes-1 @@ -297,7 +304,7 @@ PersistentVolumeClaimStatus 是持久卷申领的当前状态。 allocatedResources is the storage resource within AllocatedResources tracks the capacity allocated to a PVC. It may be larger than the actual capacity when a volume expansion operation is requested. For storage quota, the larger value from allocatedResources and PVC.spec.resources is used. If allocatedResources is not set, PVC.spec.resources alone is used for quota calculation. If a volume expansion capacity request is lowered, allocatedResources is only lowered if there are no expansion operations in progress and if the actual volume capacity is equal or lower than the requested capacity. This is an alpha field and requires enabling RecoverVolumeExpansionFailure feature. --> - **allocatedResources** (map[string]}}">Quantity) - + allocatedResources 跟踪分配给 PVC 的容量。 当出现卷扩充操作请求时,此字段可能大于实际的容量。 就存储配额而言,将使用 allocatedResources 和 PVC.spec.resources 二者中的更大值。 @@ -312,31 +319,33 @@ PersistentVolumeClaimStatus 是持久卷申领的当前状态。 capacity represents the actual resources of the underlying volume. --> - **capacity** (map[string]}}">Quantity) - + capacity 表示底层卷的实际资源。 - **conditions** ([]PersistentVolumeClaimCondition) - + **补丁策略:按照键 `type` 合并** - + conditions 是持久卷声明的当前的状况。 如果正在调整底层持久卷的大小,则状况将被设为 “ResizeStarted”。 - - + + **PersistentVolumeClaimCondition 包含有关 PVC 状态的详细信息。** +--> - **conditions.lastTransitionTime** (Time) - + lastTransitionTime 是状况从一个状态转换为另一个状态的时间。 - + **Time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。 为 time 包提供的许多工厂方法提供了包装类。** - **conditions.message** (string) - + message 是人类可读的消息,指示有关上一次转换的详细信息。 - **conditions.reason** (string) - + reason 是唯一的,它应该是一个机器可理解的简短字符串,指明上次状况转换的原因。 如果它报告 “ResizeStarted”,则意味着正在调整底层持久卷的大小。 - **phase** (string) - + phase 表示 PersistentVolumeClaim 的当前阶段。 - **resizeStatus** (string) - + resizeStatus 存储大小调整操作的状态。默认不设置 resizeStatus,但在扩充完成时, resizeStatus 将由大小调整控制器或 kubelet 设为空。 这是一个 Alpha 字段,需要启用 RecoverVolumeExpansionFailure 功能特性。 @@ -422,12 +431,12 @@ PersistentVolumeClaimList 是 PersistentVolumeClaim 各项的列表。 items is a list of persistent volume claims. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims --> - **metadata** (}}">ListMeta) - + 标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - **items** ([]}}">PersistentVolumeClaim),必需 - + items 是持久卷申领的列表。更多信息: https://kubernetes.io/zh-cn/docs/concepts/storage/persistent-volumes#persistentvolumeclaims @@ -449,19 +458,20 @@ GET /api/v1/namespaces/{namespace}/persistentvolumeclaims/{name} - **name** (*in path*): string, required name of the PersistentVolumeClaim - **namespace** (*in path*): string, required + - **pretty** (*in query*): string --> #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **allowWatchBookmarks** (**查询参数**): boolean - + }}">allowWatchBookmarks - **continue** (**查询参数**): string - + }}">continue - **fieldSelector** (**查询参数**): string - + }}">fieldSelector - **labelSelector** (**查询参数**): string - + }}">labelSelector - **limit** (**查询参数**): integer - + }}">limit - **pretty** (**查询参数**): string - + }}">pretty - **resourceVersion** (**查询参数**): string - + }}">resourceVersion - **resourceVersionMatch** (**查询参数**): string - + }}">resourceVersionMatch +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds** (**查询参数**): integer - + }}">timeoutSeconds - **watch** (**查询参数**): boolean - + }}">watch #### 参数 - **allowWatchBookmarks** (**查询参数**): boolean - + }}">allowWatchBookmarks - **continue** (**查询参数**): string - + }}">continue - **fieldSelector** (**查询参数**): string - + }}">fieldSelector - **labelSelector** (**查询参数**): string - + }}">labelSelector - **limit** (**查询参数**): integer - + }}">limit - **pretty** (**查询参数**): string - + }}">pretty - **resourceVersion** (**查询参数**): string - + }}">resourceVersion - **resourceVersionMatch** (**查询参数**): string - + }}">resourceVersionMatch +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds** (**查询参数**): integer - + }}">timeoutSeconds - **watch** (**查询参数**): boolean - + }}">watch #### 参数 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">PersistentVolumeClaim,必需 - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldManager** (**查询参数**): string - + }}">fieldManager - **fieldValidation** (**查询参数**): string - + }}">fieldValidation - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">PersistentVolumeClaim,必需 - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldManager** (**查询参数**): string - + }}">fieldManager - **fieldValidation** (**查询参数**): string - + }}">fieldValidation - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">PersistentVolumeClaim,必需 - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldManager** (**查询参数**): string - + }}">fieldManager - **fieldValidation** (**查询参数**): string - + }}">fieldValidation - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">Patch,必需 - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldManager** (**查询参数**): string - + }}">fieldManager - **fieldValidation** (**查询参数**): string - + }}">fieldValidation - **force** (**查询参数**): boolean - + }}">force - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">Patch,必需 - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldManager** (**查询参数**): string - + }}">fieldManager - **fieldValidation** (**查询参数**): string - + }}">fieldValidation - **force** (**查询参数**): boolean - + }}">force - **pretty** (**查询参数**): string - + }}">pretty #### 参数 - **name** (**路径参数**): string,必需 - + PersistentVolumeClaim 的名称 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">DeleteOptions - **dryRun** (**查询参数**): string - + }}">dryRun - **gracePeriodSeconds** (**查询参数**): integer - + }}">gracePeriodSeconds - **pretty** (**查询参数**): string - + }}">pretty - **propagationPolicy** (**查询参数**): string - + }}">propagationPolicy #### 参数 - **namespace** (**路径参数**): string,必需 - + }}">namespace - **body**: }}">DeleteOptions - **continue** (**查询参数**): string - + }}">continue - **dryRun** (**查询参数**): string - + }}">dryRun - **fieldSelector** (**查询参数**): string - + }}">fieldSelector - **gracePeriodSeconds** (**查询参数**): integer - + }}">gracePeriodSeconds - **labelSelector** (**查询参数**): string - + }}">labelSelector - **limit** (**查询参数**): integer - + }}">limit - **pretty** (**查询参数**): string - + }}">pretty - **propagationPolicy** (**查询参数**): string - + }}">propagationPolicy - **resourceVersion** (**查询参数**): string - + }}">resourceVersion - **resourceVersionMatch** (**查询参数**): string - + }}">resourceVersionMatch +- **sendInitialEvents** (**查询参数**): boolean + + }}">sendInitialEvents + - **timeoutSeconds** (**查询参数**): integer - + }}">timeoutSeconds