[zh]Update concepts pages(part-4) for links with '/zh/' prefix, using new prefix '/zh-cn/'
This commit is contained in:
@@ -23,7 +23,7 @@ automatically provisions storage when it is requested by users.
|
||||
动态卷供应允许按需创建存储卷。
|
||||
如果没有动态供应,集群管理员必须手动地联系他们的云或存储提供商来创建新的存储卷,
|
||||
然后在 Kubernetes 集群创建
|
||||
[`PersistentVolume` 对象](/zh/docs/concepts/storage/persistent-volumes/)来表示这些卷。
|
||||
[`PersistentVolume` 对象](/zh-cn/docs/concepts/storage/persistent-volumes/)来表示这些卷。
|
||||
动态供应功能消除了集群管理员预先配置存储的需要。 相反,它在用户请求时自动供应存储。
|
||||
|
||||
<!-- body -->
|
||||
@@ -58,7 +58,7 @@ have the ability to select from multiple storage options.
|
||||
More information on storage classes can be found
|
||||
[here](/docs/concepts/storage/storage-classes/).
|
||||
-->
|
||||
点击[这里](/zh/docs/concepts/storage/storage-classes/)查阅有关存储类的更多信息。
|
||||
点击[这里](/zh-cn/docs/concepts/storage/storage-classes/)查阅有关存储类的更多信息。
|
||||
|
||||
<!--
|
||||
## Enabling Dynamic Provisioning
|
||||
@@ -78,7 +78,7 @@ disk-like persistent disks.
|
||||
-->
|
||||
要启用动态供应功能,集群管理员需要为用户预先创建一个或多个 `StorageClass` 对象。
|
||||
`StorageClass` 对象定义当动态供应被调用时,哪一个驱动将被使用和哪些参数将被传递给驱动。
|
||||
StorageClass 对象的名字必须是一个合法的 [DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
|
||||
StorageClass 对象的名字必须是一个合法的 [DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
|
||||
以下清单创建了一个 `StorageClass` 存储类 "slow",它提供类似标准磁盘的永久磁盘。
|
||||
|
||||
```yaml
|
||||
@@ -172,7 +172,7 @@ can enable this behavior by:
|
||||
is enabled on the API server.
|
||||
-->
|
||||
- 标记一个 `StorageClass` 为 *默认*;
|
||||
- 确保 [`DefaultStorageClass` 准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)在 API 服务端被启用。
|
||||
- 确保 [`DefaultStorageClass` 准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)在 API 服务端被启用。
|
||||
|
||||
<!--
|
||||
An administrator can mark a specific `StorageClass` as default by adding the
|
||||
@@ -205,7 +205,7 @@ Zones in a Region. Single-Zone storage backends should be provisioned in the Zon
|
||||
Pods are scheduled. This can be accomplished by setting the [Volume Binding
|
||||
Mode](/docs/concepts/storage/storage-classes/#volume-binding-mode).
|
||||
-->
|
||||
在[多区域](/zh/docs/setup/best-practices/multiple-zones/)集群中,Pod 可以被分散到多个区域。
|
||||
在[多区域](/zh-cn/docs/setup/best-practices/multiple-zones/)集群中,Pod 可以被分散到多个区域。
|
||||
单区域存储后端应该被供应到 Pod 被调度到的区域。
|
||||
这可以通过设置[卷绑定模式](/zh/docs/concepts/storage/storage-classes/#volume-binding-mode)来实现。
|
||||
这可以通过设置[卷绑定模式](/zh-cn/docs/concepts/storage/storage-classes/#volume-binding-mode)来实现。
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ with [volumes](/docs/concepts/storage/volumes/) is suggested, in
|
||||
particular PersistentVolumeClaim and PersistentVolume.
|
||||
-->
|
||||
本文档描述 Kubernetes 中的 _临时卷(Ephemeral Volume)_。
|
||||
建议先了解[卷](/zh/docs/concepts/storage/volumes/),特别是 PersistentVolumeClaim 和 PersistentVolume。
|
||||
建议先了解[卷](/zh-cn/docs/concepts/storage/volumes/),特别是 PersistentVolumeClaim 和 PersistentVolume。
|
||||
|
||||
<!-- body -->
|
||||
<!--
|
||||
@@ -80,13 +80,13 @@ different purposes:
|
||||
can be provided by all storage drivers that also support persistent volumes
|
||||
-->
|
||||
Kubernetes 为了不同的目的,支持几种不同类型的临时卷:
|
||||
- [emptyDir](/zh/docs/concepts/storage/volumes/#emptydir):
|
||||
- [emptyDir](/zh-cn/docs/concepts/storage/volumes/#emptydir):
|
||||
Pod 启动时为空,存储空间来自本地的 kubelet 根目录(通常是根磁盘)或内存
|
||||
- [configMap](/zh/docs/concepts/storage/volumes/#configmap)、
|
||||
[downwardAPI](/zh/docs/concepts/storage/volumes/#downwardapi)、
|
||||
[secret](/zh/docs/concepts/storage/volumes/#secret):
|
||||
- [configMap](/zh-cn/docs/concepts/storage/volumes/#configmap)、
|
||||
[downwardAPI](/zh-cn/docs/concepts/storage/volumes/#downwardapi)、
|
||||
[secret](/zh-cn/docs/concepts/storage/volumes/#secret):
|
||||
将不同类型的 Kubernetes 数据注入到 Pod 中
|
||||
- [CSI 临时卷](/zh/docs/concepts/storage/volumes/#csi-ephemeral-volumes):
|
||||
- [CSI 临时卷](/zh-cn/docs/concepts/storage/volumes/#csi-ephemeral-volumes):
|
||||
类似于前面的卷类型,但由专门[支持此特性](https://kubernetes-csi.github.io/docs/drivers.html)
|
||||
的指定
|
||||
[CSI 驱动程序](https://github.com/container-storage-interface/spec/blob/master/spec.md)提供
|
||||
@@ -103,7 +103,7 @@ CSI ephemeral volumes *must* be provided by third-party CSI storage
|
||||
drivers.
|
||||
-->
|
||||
`emptyDir`、`configMap`、`downwardAPI`、`secret` 是作为
|
||||
[本地临时存储](/zh/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage)
|
||||
[本地临时存储](/zh-cn/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage)
|
||||
提供的。它们由各个节点上的 kubelet 管理。
|
||||
|
||||
CSI 临时卷 *必须* 由第三方 CSI 存储驱动程序提供。
|
||||
@@ -144,7 +144,7 @@ shows which drivers support ephemeral volumes.
|
||||
-->
|
||||
|
||||
该特性需要启用参数 `CSIInlineVolume`
|
||||
[特性门控(feature gate)](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
[特性门控(feature gate)](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
该参数从 Kubernetes 1.16 开始默认启用。
|
||||
|
||||
{{< note >}}
|
||||
@@ -171,7 +171,7 @@ Here's an example manifest for a Pod that uses CSI ephemeral storage:
|
||||
从概念上讲,CSI 临时卷类似于 `configMap`、`downwardAPI` 和 `secret` 类型的卷:
|
||||
其存储在每个节点本地管理,并在将 Pod 调度到节点后与其他本地资源一起创建。
|
||||
在这个阶段,Kubernetes 没有重新调度 Pods 的概念。卷创建不太可能失败,否则 Pod 启动将会受阻。
|
||||
特别是,这些卷 **不** 支持[感知存储容量的 Pod 调度](/zh/docs/concepts/storage/storage-capacity/)。
|
||||
特别是,这些卷 **不** 支持[感知存储容量的 Pod 调度](/zh-cn/docs/concepts/storage/storage-capacity/)。
|
||||
它们目前也没包括在 Pod 的存储资源使用限制中,因为 kubelet 只能对它自己管理的存储强制执行。
|
||||
|
||||
下面是使用 CSI 临时存储的 Pod 的示例清单:
|
||||
@@ -226,7 +226,7 @@ CSI 临时卷允许用户直接向 CSI 驱动程序提供 `volumeAttributes`,
|
||||
例如,通常在 StorageClass 中定义的参数不应通过使用内联临时卷向用户公开。
|
||||
|
||||
作为一个集群管理员,你可以使用
|
||||
[PodSecurityPolicy](/zh/docs/concepts/security/pod-security-policy/)
|
||||
[PodSecurityPolicy](/zh-cn/docs/concepts/security/pod-security-policy/)
|
||||
来控制在 Pod 中可以使用哪些 CSI 驱动程序,
|
||||
具体则是通过 [`allowedCSIDrivers` 字段](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podsecuritypolicyspec-v1beta1-policy)
|
||||
指定。
|
||||
@@ -239,7 +239,7 @@ allowed to be used as inline volumes within a Pod spec may do so by:
|
||||
-->
|
||||
如果集群管理员需要限制 CSI 驱动程序在 Pod 规约中被作为内联卷使用,可以这样做:
|
||||
- 从 CSIDriver 规约的 `volumeLifecycleModes` 中删除 `Ephemeral`,这可以防止驱动程序被用作内联临时卷。
|
||||
- 使用[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
- 使用[准入 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
来限制如何使用此驱动程序。
|
||||
|
||||
<!--
|
||||
@@ -275,10 +275,10 @@ Example:
|
||||
- 卷可以有固定的大小,Pod 不能超量使用。
|
||||
- 卷可能有一些初始数据,这取决于驱动程序和参数。
|
||||
- 当驱动程序支持,卷上的典型操作将被支持,包括
|
||||
([快照](/zh/docs/concepts/storage/volume-snapshots/)、
|
||||
[克隆](/zh/docs/concepts/storage/volume-pvc-datasource/)、
|
||||
[调整大小](/zh/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims)和
|
||||
[存储容量跟踪](/zh/docs/concepts/storage/storage-capacity/))。
|
||||
([快照](/zh-cn/docs/concepts/storage/volume-snapshots/)、
|
||||
[克隆](/zh-cn/docs/concepts/storage/volume-pvc-datasource/)、
|
||||
[调整大小](/zh-cn/docs/concepts/storage/persistent-volumes/#expanding-persistent-volumes-claims)和
|
||||
[存储容量跟踪](/zh-cn/docs/concepts/storage/storage-capacity/))。
|
||||
|
||||
示例:
|
||||
|
||||
@@ -357,7 +357,7 @@ storage classes is to delete volumes. You can create quasi-ephemeral local stora
|
||||
using a StorageClass with a reclaim policy of `retain`: the storage outlives the Pod,
|
||||
and in this case you need to ensure that volume clean up happens separately.
|
||||
-->
|
||||
就[资源所有权](/zh/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)而言,
|
||||
就[资源所有权](/zh-cn/docs/concepts/workloads/controllers/garbage-collection/#owners-and-dependents)而言,
|
||||
拥有通用临时存储的 Pod 是提供临时存储 (ephemeral storage) 的 PersistentVolumeClaim 的所有者。
|
||||
当 Pod 被删除时,Kubernetes 垃圾收集器会删除 PVC,
|
||||
然后 PVC 通常会触发卷的删除,因为存储类的默认回收策略是删除卷。
|
||||
@@ -436,7 +436,7 @@ use an [admission webhook](/docs/reference/access-authn-authz/extensible-admissi
|
||||
启用 GenericEphemeralVolume 特性会导致那些没有 PVCs 创建权限的用户,
|
||||
在创建 Pods 时,被允许间接的创建 PVCs。
|
||||
集群管理员必须意识到这一点。
|
||||
如果这不符合他们的安全模型,他们应该使用一个[准入 Webhook](/zh/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
如果这不符合他们的安全模型,他们应该使用一个[准入 Webhook](/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers/)
|
||||
拒绝包含通用临时卷的 Pods。
|
||||
|
||||
<!--
|
||||
@@ -444,7 +444,7 @@ The normal [namespace quota for PVCs](/docs/concepts/policy/resource-quotas/#sto
|
||||
even if users are allowed to use this new mechanism, they cannot use
|
||||
it to circumvent other policies.
|
||||
-->
|
||||
[为 PVC 卷所设置的逐名字空间的配额](/zh/docs/concepts/policy/resource-quotas/#storage-resource-quota)
|
||||
[为 PVC 卷所设置的逐名字空间的配额](/zh-cn/docs/concepts/policy/resource-quotas/#storage-resource-quota)
|
||||
仍然有效,因此即使允许用户使用这种新机制,他们也不能使用它来规避其他策略。
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
@@ -456,7 +456,7 @@ See [local ephemeral storage](/docs/concepts/configuration/manage-resources-cont
|
||||
-->
|
||||
### kubelet 管理的临时卷 {#ephemeral-volumes-managed-by-kubelet}
|
||||
|
||||
参阅[本地临时存储](/zh/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage)。
|
||||
参阅[本地临时存储](/zh-cn/docs/concepts/configuration/manage-resources-containers/#local-ephemeral-storage)。
|
||||
|
||||
<!--
|
||||
### CSI ephemeral volumes
|
||||
|
||||
@@ -32,7 +32,7 @@ weight: 20
|
||||
This document describes _persistent volumes_ in Kubernetes. Familiarity with [volumes](/docs/concepts/storage/volumes/) is suggested.
|
||||
-->
|
||||
本文描述 Kubernetes 中的 _持久卷(Persistent Volume)_ 。
|
||||
建议先熟悉[卷(Volume)](/zh/docs/concepts/storage/volumes/)的概念。
|
||||
建议先熟悉[卷(Volume)](/zh-cn/docs/concepts/storage/volumes/)的概念。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -52,7 +52,7 @@ PersistentVolumeClaim。
|
||||
A _PersistentVolume_ (PV) is a piece of storage in the cluster that has been provisioned by an administrator or dynamically provisioned using [Storage Classes](/docs/concepts/storage/storage-classes/). It is a resource in the cluster just like a node is a cluster resource. PVs are volume plugins like Volumes, but have a lifecycle independent of any individual Pod that uses the PV. This API object captures the details of the implementation of the storage, be that NFS, iSCSI, or a cloud-provider-specific storage system.
|
||||
-->
|
||||
持久卷(PersistentVolume,PV)是集群中的一块存储,可以由管理员事先供应,或者
|
||||
使用[存储类(Storage Class)](/zh/docs/concepts/storage/storage-classes/)来动态供应。
|
||||
使用[存储类(Storage Class)](/zh-cn/docs/concepts/storage/storage-classes/)来动态供应。
|
||||
持久卷是集群资源,就像节点也是集群资源一样。PV 持久卷和普通的 Volume 一样,也是使用
|
||||
卷插件来实现的,只是它们拥有独立于任何使用 PV 的 Pod 的生命周期。
|
||||
此 API 对象中记述了存储的实现细节,无论其背后是 NFS、iSCSI 还是特定于云平台的存储系统。
|
||||
@@ -77,7 +77,7 @@ See the [detailed walkthrough with working examples](/docs/tasks/configure-pod-c
|
||||
仅限于卷大小和访问模式,同时又不能将卷是如何实现的这些细节暴露给用户。
|
||||
为了满足这类需求,就有了 _存储类(StorageClass)_ 资源。
|
||||
|
||||
参见[基于运行示例的详细演练](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/)。
|
||||
参见[基于运行示例的详细演练](/zh-cn/docs/tasks/configure-pod-container/configure-persistent-volume-storage/)。
|
||||
|
||||
<!--
|
||||
## Lifecycle of a volume and claim
|
||||
@@ -123,7 +123,7 @@ dynamic provisioning for themselves.
|
||||
如果管理员所创建的所有静态 PV 卷都无法与用户的 PersistentVolumeClaim 匹配,
|
||||
集群可以尝试为该 PVC 申领动态供应一个存储卷。
|
||||
这一供应操作是基于 StorageClass 来实现的:PVC 申领必须请求某个
|
||||
[存储类](/zh/docs/concepts/storage/storage-classes/),同时集群管理员必须
|
||||
[存储类](/zh-cn/docs/concepts/storage/storage-classes/),同时集群管理员必须
|
||||
已经创建并配置了该类,这样动态供应卷的动作才会发生。
|
||||
如果 PVC 申领指定存储类为 `""`,则相当于为自身禁止使用动态供应的卷。
|
||||
|
||||
@@ -136,11 +136,11 @@ the API server component. For more information on API server command-line flags,
|
||||
check [kube-apiserver](/docs/admin/kube-apiserver/) documentation.
|
||||
-->
|
||||
为了基于存储类完成动态的存储供应,集群管理员需要在 API 服务器上启用
|
||||
`DefaultStorageClass` [准入控制器](/zh/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)。
|
||||
`DefaultStorageClass` [准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)。
|
||||
举例而言,可以通过保证 `DefaultStorageClass` 出现在 API 服务器组件的
|
||||
`--enable-admission-plugins` 标志值中实现这点;该标志的值可以是逗号
|
||||
分隔的有序列表。关于 API 服务器标志的更多信息,可以参考
|
||||
[kube-apiserver](/zh/docs/reference/command-line-tools-reference/kube-apiserver/)
|
||||
[kube-apiserver](/zh-cn/docs/reference/command-line-tools-reference/kube-apiserver/)
|
||||
文档。
|
||||
|
||||
<!--
|
||||
@@ -317,7 +317,7 @@ Cinder 卷)中移除所关联的存储资产。
|
||||
动态供应的卷会继承[其 StorageClass 中设置的回收策略](#reclaim-policy),该策略默认
|
||||
为 `Delete`。
|
||||
管理员需要根据用户的期望来配置 StorageClass;否则 PV 卷被创建之后必须要被
|
||||
编辑或者修补。参阅[更改 PV 卷的回收策略](/zh/docs/tasks/administer-cluster/change-pv-reclaim-policy/).
|
||||
编辑或者修补。参阅[更改 PV 卷的回收策略](/zh-cn/docs/tasks/administer-cluster/change-pv-reclaim-policy/).
|
||||
|
||||
<!--
|
||||
#### Recycle
|
||||
@@ -343,7 +343,7 @@ The custom recycler Pod template must contain a `volumes` specification, as
|
||||
shown in the example below:
|
||||
-->
|
||||
不过,管理员可以按
|
||||
[参考资料](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/)
|
||||
[参考资料](/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager/)
|
||||
中所述,使用 Kubernetes 控制器管理器命令行参数来配置一个定制的回收器(Recycler)
|
||||
Pod 模板。此定制的回收器 Pod 模板必须包含一个 `volumes` 规约,如下例所示:
|
||||
|
||||
@@ -484,7 +484,7 @@ The control plane still checks that [storage class](/docs/concepts/storage/stora
|
||||
-->
|
||||
绑定操作不会考虑某些卷匹配条件是否满足,包括节点亲和性等等。
|
||||
控制面仍然会检查
|
||||
[存储类](/zh/docs/concepts/storage/storage-classes/)、访问模式和所请求的
|
||||
[存储类](/zh-cn/docs/concepts/storage/storage-classes/)、访问模式和所请求的
|
||||
存储尺寸都是合法的。
|
||||
|
||||
```yaml
|
||||
@@ -720,7 +720,7 @@ Recovery from failing PVC expansion by users is available as an alpha feature si
|
||||
{{< note >}}
|
||||
Kubernetes 从 1.23 版本开始将允许用户恢复失败的 PVC 扩展这一能力作为
|
||||
alpha 特性支持。 `RecoverVolumeExpansionFailure` 必须被启用以允许使用此特性。
|
||||
可参考[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
可参考[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
文档了解更多信息。
|
||||
{{< /note >}}
|
||||
|
||||
@@ -787,23 +787,23 @@ PV 持久卷是用插件的形式来实现的。Kubernetes 目前支持以下插
|
||||
* [`rbd`](/docs/concepts/storage/volumes/#rbd) - Rados Block Device (RBD) volume
|
||||
* [`vsphereVolume`](/docs/concepts/storage/volumes/#vspherevolume) - vSphere VMDK volume
|
||||
-->
|
||||
* [`awsElasticBlockStore`](/zh/docs/concepts/storage/volumes/#awselasticblockstore) - AWS 弹性块存储(EBS)
|
||||
* [`azureDisk`](/zh/docs/concepts/storage/volumes/#azuredisk) - Azure Disk
|
||||
* [`azureFile`](/zh/docs/concepts/storage/volumes/#azurefile) - Azure File
|
||||
* [`cephfs`](/zh/docs/concepts/storage/volumes/#cephfs) - CephFS volume
|
||||
* [`csi`](/zh/docs/concepts/storage/volumes/#csi) - 容器存储接口 (CSI)
|
||||
* [`fc`](/zh/docs/concepts/storage/volumes/#fc) - Fibre Channel (FC) 存储
|
||||
* [`gcePersistentDisk`](/zh/docs/concepts/storage/volumes/#gcepersistentdisk) - GCE 持久化盘
|
||||
* [`glusterfs`](/zh/docs/concepts/storage/volumes/#glusterfs) - Glusterfs 卷
|
||||
* [`hostPath`](/zh/docs/concepts/storage/volumes/#hostpath) - HostPath 卷
|
||||
* [`awsElasticBlockStore`](/zh-cn/docs/concepts/storage/volumes/#awselasticblockstore) - AWS 弹性块存储(EBS)
|
||||
* [`azureDisk`](/zh-cn/docs/concepts/storage/volumes/#azuredisk) - Azure Disk
|
||||
* [`azureFile`](/zh-cn/docs/concepts/storage/volumes/#azurefile) - Azure File
|
||||
* [`cephfs`](/zh-cn/docs/concepts/storage/volumes/#cephfs) - CephFS volume
|
||||
* [`csi`](/zh-cn/docs/concepts/storage/volumes/#csi) - 容器存储接口 (CSI)
|
||||
* [`fc`](/zh-cn/docs/concepts/storage/volumes/#fc) - Fibre Channel (FC) 存储
|
||||
* [`gcePersistentDisk`](/zh-cn/docs/concepts/storage/volumes/#gcepersistentdisk) - GCE 持久化盘
|
||||
* [`glusterfs`](/zh-cn/docs/concepts/storage/volumes/#glusterfs) - Glusterfs 卷
|
||||
* [`hostPath`](/zh-cn/docs/concepts/storage/volumes/#hostpath) - HostPath 卷
|
||||
(仅供单节点测试使用;不适用于多节点集群;
|
||||
请尝试使用 `local` 卷作为替代)
|
||||
* [`iscsi`](/zh/docs/concepts/storage/volumes/#iscsi) - iSCSI (SCSI over IP) 存储
|
||||
* [`local`](/zh/docs/concepts/storage/volumes/#local) - 节点上挂载的本地存储设备
|
||||
* [`nfs`](/zh/docs/concepts/storage/volumes/#nfs) - 网络文件系统 (NFS) 存储
|
||||
* [`portworxVolume`](/zh/docs/concepts/storage/volumes/#portworxvolume) - Portworx 卷
|
||||
* [`rbd`](/zh/docs/concepts/storage/volumes/#rbd) - Rados 块设备 (RBD) 卷
|
||||
* [`vsphereVolume`](/zh/docs/concepts/storage/volumes/#vspherevolume) - vSphere VMDK 卷
|
||||
* [`iscsi`](/zh-cn/docs/concepts/storage/volumes/#iscsi) - iSCSI (SCSI over IP) 存储
|
||||
* [`local`](/zh-cn/docs/concepts/storage/volumes/#local) - 节点上挂载的本地存储设备
|
||||
* [`nfs`](/zh-cn/docs/concepts/storage/volumes/#nfs) - 网络文件系统 (NFS) 存储
|
||||
* [`portworxVolume`](/zh-cn/docs/concepts/storage/volumes/#portworxvolume) - Portworx 卷
|
||||
* [`rbd`](/zh-cn/docs/concepts/storage/volumes/#rbd) - Rados 块设备 (RBD) 卷
|
||||
* [`vsphereVolume`](/zh-cn/docs/concepts/storage/volumes/#vspherevolume) - vSphere VMDK 卷
|
||||
|
||||
<!--
|
||||
The following types of PersistentVolume are deprecated. This means that support is still available but will be removed in a future Kubernetes release.
|
||||
@@ -823,7 +823,7 @@ The following types of PersistentVolume are deprecated. This means that support
|
||||
以下的持久卷已被弃用。这意味着当前仍是支持的,但是 Kubernetes 将来的发行版会将其移除。
|
||||
|
||||
* [`cinder`](/docs/concepts/storage/volumes/#cinder) - Cinder(OpenStack 块存储)(于 v1.18 **弃用**)
|
||||
* [`flexVolume`](/zh/docs/concepts/storage/volumes/#flexVolume) - FlexVolume (于 v1.23 **弃用**)
|
||||
* [`flexVolume`](/zh-cn/docs/concepts/storage/volumes/#flexVolume) - FlexVolume (于 v1.23 **弃用**)
|
||||
* [`flocker`](/docs/concepts/storage/volumes/#flocker) - Flocker 存储(于 v1.22 **弃用**)
|
||||
* [`quobyte`](/docs/concepts/storage/volumes/#quobyte) - Quobyte 卷
|
||||
(于 v1.22 **弃用**)
|
||||
@@ -854,7 +854,7 @@ The name of a PersistentVolume object must be a valid
|
||||
|
||||
每个 PV 对象都包含 `spec` 部分和 `status` 部分,分别对应卷的规约和状态。
|
||||
PersistentVolume 对象的名称必须是合法的
|
||||
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
|
||||
[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
@@ -898,7 +898,7 @@ Currently, storage size is the only resource that can be set or requested. Futu
|
||||
一般而言,每个 PV 卷都有确定的存储容量。
|
||||
容量属性是使用 PV 对象的 `capacity` 属性来设置的。
|
||||
参考词汇表中的
|
||||
[量纲(Quantity)](/zh/docs/reference/glossary/?all=true#term-quantity)
|
||||
[量纲(Quantity)](/zh-cn/docs/reference/glossary/?all=true#term-quantity)
|
||||
词条,了解 `capacity` 字段可以接受的单位。
|
||||
|
||||
目前,存储大小是可以设置和请求的唯一资源。
|
||||
@@ -1076,7 +1076,7 @@ to PVCs that request no particular class.
|
||||
### 类 {#class}
|
||||
|
||||
每个 PV 可以属于某个类(Class),通过将其 `storageClassName` 属性设置为某个
|
||||
[StorageClass](/zh/docs/concepts/storage/storage-classes/) 的名称来指定。
|
||||
[StorageClass](/zh-cn/docs/concepts/storage/storage-classes/) 的名称来指定。
|
||||
特定类的 PV 卷只能绑定到请求该类存储卷的 PVC 申领。
|
||||
未设置 `storageClassName` 的 PV 卷没有类设定,只能绑定到那些没有指定特定
|
||||
存储类的 PVC 申领。
|
||||
@@ -1181,11 +1181,11 @@ For most volume types, you do not need to set this field. It is automatically po
|
||||
-->
|
||||
{{< note >}}
|
||||
对大多数类型的卷而言,你不需要设置节点亲和性字段。
|
||||
[AWS EBS](/zh/docs/concepts/storage/volumes/#awselasticblockstore)、
|
||||
[GCE PD](/zh/docs/concepts/storage/volumes/#gcepersistentdisk) 和
|
||||
[Azure Disk](/zh/docs/concepts/storage/volumes/#azuredisk) 卷类型都能
|
||||
[AWS EBS](/zh-cn/docs/concepts/storage/volumes/#awselasticblockstore)、
|
||||
[GCE PD](/zh-cn/docs/concepts/storage/volumes/#gcepersistentdisk) 和
|
||||
[Azure Disk](/zh-cn/docs/concepts/storage/volumes/#azuredisk) 卷类型都能
|
||||
自动设置相关字段。
|
||||
你需要为 [local](/zh/docs/concepts/storage/volumes/#local) 卷显式地设置
|
||||
你需要为 [local](/zh-cn/docs/concepts/storage/volumes/#local) 卷显式地设置
|
||||
此属性。
|
||||
{{< /note >}}
|
||||
|
||||
@@ -1221,7 +1221,7 @@ The name of a PersistentVolumeClaim object must be a valid
|
||||
-->
|
||||
每个 PVC 对象都有 `spec` 和 `status` 部分,分别对应申领的规约和状态。
|
||||
PersistentVolumeClaim 对象的名称必须是合法的
|
||||
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
|
||||
[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
|
||||
|
||||
|
||||
```yaml
|
||||
@@ -1280,7 +1280,7 @@ Claims can specify a [label selector](/docs/concepts/overview/working-with-objec
|
||||
-->
|
||||
### 选择算符 {#selector}
|
||||
|
||||
申领可以设置[标签选择算符](/zh/docs/concepts/overview/working-with-objects/labels/#label-selectors)
|
||||
申领可以设置[标签选择算符](/zh-cn/docs/concepts/overview/working-with-objects/labels/#label-selectors)
|
||||
来进一步过滤卷集合。只有标签与选择算符相匹配的卷能够绑定到申领上。
|
||||
选择算符包含两个字段:
|
||||
|
||||
@@ -1309,7 +1309,7 @@ be bound to the PVC.
|
||||
### 类 {#class}
|
||||
|
||||
申领可以通过为 `storageClassName` 属性设置
|
||||
[StorageClass](/zh/docs/concepts/storage/storage-classes/) 的名称来请求特定的存储类。
|
||||
[StorageClass](/zh-cn/docs/concepts/storage/storage-classes/) 的名称来请求特定的存储类。
|
||||
只有所请求的类的 PV 卷,即 `storageClassName` 值与 PVC 设置相同的 PV 卷,
|
||||
才能绑定到 PVC 申领。
|
||||
|
||||
@@ -1327,7 +1327,7 @@ PVC 申领不必一定要请求某个类。如果 PVC 的 `storageClassName` 属
|
||||
存储类的 PV 卷(未设置注解或者注解值为 `""` 的 PersistentVolume(PV)对象在系统中不会被删除,因为这样做可能会引起数据丢失。
|
||||
未设置 `storageClassName` 的 PVC 与此大不相同,也会被集群作不同处理。
|
||||
具体筛查方式取决于
|
||||
[`DefaultStorageClass` 准入控制器插件](/zh/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)
|
||||
[`DefaultStorageClass` 准入控制器插件](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#defaultstorageclass)
|
||||
是否被启用。
|
||||
|
||||
<!--
|
||||
@@ -1435,7 +1435,7 @@ See [an example of `hostPath` typed volume](/docs/tasks/configure-pod-container/
|
||||
### 类型为 `hostpath` 的 PersistentVolume {#persistentvolumes-typed-hostpath}
|
||||
|
||||
`hostPath` PersistentVolume 使用节点上的文件或目录来模拟网络附加(network-attached)存储。
|
||||
相关细节可参阅[`hostPath` 卷示例](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume)。
|
||||
相关细节可参阅[`hostPath` 卷示例](/zh-cn/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume)。
|
||||
|
||||
<!--
|
||||
## Raw Block Volume Support
|
||||
@@ -1526,7 +1526,7 @@ gate enabled, use of the `dataSourceRef` is preferred over `dataSource`.
|
||||
{{< note >}}
|
||||
Kubernetes 支持自定义的卷填充器;要使用自定义的卷填充器,你必须为
|
||||
kube-apiserver 和 kube-controller-manager 启用 `AnyVolumeDataSource`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
{{< /note >}}
|
||||
|
||||
卷填充器利用了 PVC 规约字段 `dataSourceRef`。
|
||||
@@ -1722,7 +1722,7 @@ To enable support for restoring a volume from a volume snapshot data source, ena
|
||||
`VolumeSnapshotDataSource` feature gate on the apiserver and controller-manager.
|
||||
-->
|
||||
卷快照(Volume Snapshot)特性的添加仅是为了支持 CSI 卷插件。
|
||||
有关细节可参阅[卷快照](/zh/docs/concepts/storage/volume-snapshots/)文档。
|
||||
有关细节可参阅[卷快照](/zh-cn/docs/concepts/storage/volume-snapshots/)文档。
|
||||
|
||||
要启用从卷快照数据源恢复数据卷的支持,可在 API 服务器和控制器管理器上启用
|
||||
`VolumeSnapshotDataSource` 特性门控。
|
||||
@@ -1757,7 +1757,7 @@ spec:
|
||||
-->
|
||||
## 卷克隆 {#volume-cloning}
|
||||
|
||||
[卷克隆](/zh/docs/concepts/storage/volume-pvc-datasource/)功能特性仅适用于
|
||||
[卷克隆](/zh-cn/docs/concepts/storage/volume-pvc-datasource/)功能特性仅适用于
|
||||
CSI 卷插件。
|
||||
|
||||
<!--
|
||||
@@ -1840,8 +1840,8 @@ and need persistent storage, it is recommended that you use the following patter
|
||||
* Learn more about [Creating a PersistentVolumeClaim](/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim).
|
||||
* Read the [Persistent Storage design document](https://github.com/kubernetes/design-proposals-archive/blob/main/storage/persistent-storage.md).
|
||||
-->
|
||||
* 进一步了解[创建持久卷](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume).
|
||||
* 进一步学习[创建 PVC 申领](/zh/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim).
|
||||
* 进一步了解[创建持久卷](/zh-cn/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume).
|
||||
* 进一步学习[创建 PVC 申领](/zh-cn/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim).
|
||||
* 阅读[持久存储的设计文档](https://github.com/kubernetes/design-proposals-archive/blob/main/storage/persistent-storage.md).
|
||||
|
||||
<!--
|
||||
|
||||
@@ -20,7 +20,7 @@ weight: 21 # just after persistent volumes
|
||||
This document describes _projected volumes_ in Kubernetes. Familiarity with [volumes](/docs/concepts/storage/volumes/) is suggested.
|
||||
-->
|
||||
本文档描述 Kubernetes 中的*投射卷(Projected Volumes)*。
|
||||
建议先熟悉[卷](/zh/docs/concepts/storage/volumes/)概念。
|
||||
建议先熟悉[卷](/zh-cn/docs/concepts/storage/volumes/)概念。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -42,9 +42,9 @@ Currently, the following types of volume sources can be projected:
|
||||
|
||||
目前,以下类型的卷源可以被投射:
|
||||
|
||||
* [`secret`](/zh/docs/concepts/storage/volumes/#secret)
|
||||
* [`downwardAPI`](/zh/docs/concepts/storage/volumes/#downwardapi)
|
||||
* [`configMap`](/zh/docs/concepts/storage/volumes/#configmap)
|
||||
* [`secret`](/zh-cn/docs/concepts/storage/volumes/#secret)
|
||||
* [`downwardAPI`](/zh-cn/docs/concepts/storage/volumes/#downwardapi)
|
||||
* [`configMap`](/zh-cn/docs/concepts/storage/volumes/#configmap)
|
||||
* [`serviceAccountToken`](#serviceaccounttoken)
|
||||
|
||||
<!--
|
||||
@@ -92,7 +92,7 @@ into a Pod at a specified path. For example:
|
||||
-->
|
||||
## serviceAccountToken 投射卷 {#serviceaccounttoken}
|
||||
当 `TokenRequestProjection` 特性被启用时,你可以将当前
|
||||
[服务账号](/zh/docs/reference/access-authn-authz/authentication/#service-account-tokens)
|
||||
[服务账号](/zh-cn/docs/reference/access-authn-authz/authentication/#service-account-tokens)
|
||||
的令牌注入到 Pod 中特定路径下。例如:
|
||||
|
||||
{{< codenew file="pods/storage/projected-service-account-token.yaml" >}}
|
||||
@@ -108,7 +108,7 @@ is optional and it defaults to the identifier of the API server.
|
||||
-->
|
||||
示例 Pod 中包含一个投射卷,其中包含注入的服务账号令牌。
|
||||
此 Pod 中的容器可以使用该令牌访问 Kubernetes API 服务器, 使用
|
||||
[pod 的 ServiceAccount](/zh/docs/tasks/configure-pod-container/configure-service-account/)
|
||||
[pod 的 ServiceAccount](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/)
|
||||
进行身份验证。`audience` 字段包含令牌所针对的受众。
|
||||
收到令牌的主体必须使用令牌受众中所指定的某个标识符来标识自身,否则应该拒绝该令牌。
|
||||
此字段是可选的,默认值为 API 服务器的标识。
|
||||
@@ -130,7 +130,7 @@ of the projected volume.
|
||||
A container using a projected volume source as a [`subPath`](/docs/concepts/storage/volumes/#using-subpath)
|
||||
volume mount will not receive updates for those volume sources.
|
||||
-->
|
||||
以 [`subPath`](/zh/docs/concepts/storage/volumes/#using-subpath)
|
||||
以 [`subPath`](/zh-cn/docs/concepts/storage/volumes/#using-subpath)
|
||||
形式使用投射卷源的容器无法收到对应卷源的更新。
|
||||
{{< /note >}}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ multiple scheduling retries will be needed.
|
||||
{{< feature-state for_k8s_version="v1.24" state="stable" >}}
|
||||
|
||||
本页面描述了 Kubernetes 如何跟踪存储容量以及调度程序如何为了余下的尚未挂载的卷使用该信息将
|
||||
[Pod 调度](/zh/docs/concepts/scheduling-eviction/)到能够访问到足够存储容量的节点上。
|
||||
[Pod 调度](/zh-cn/docs/concepts/scheduling-eviction/)到能够访问到足够存储容量的节点上。
|
||||
如果没有跟踪存储容量,调度程序可能会选择一个没有足够容量来提供卷的节点,并且需要多次调度重试。
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
@@ -100,7 +100,7 @@ significant resources there.
|
||||
如果有以下情况,存储容量信息将会被 Kubernetes 调度程序使用:
|
||||
- Pod 使用的卷还没有被创建,
|
||||
- 卷使用引用了 CSI 驱动的 {{< glossary_tooltip text="StorageClass" term_id="storage-class" >}},
|
||||
并且使用了 `WaitForFirstConsumer` [卷绑定模式](/zh/docs/concepts/storage/storage-classes/#volume-binding-mode),
|
||||
并且使用了 `WaitForFirstConsumer` [卷绑定模式](/zh-cn/docs/concepts/storage/storage-classes/#volume-binding-mode),
|
||||
- 驱动程序的 `CSIDriver` 对象的 `StorageCapacity` 被设置为 true。
|
||||
|
||||
在这种情况下,调度程序仅考虑将 Pod 调度到有足够存储容量的节点上。这个检测非常简单,
|
||||
@@ -109,7 +109,7 @@ significant resources there.
|
||||
对于具有 `Immediate` 卷绑定模式的卷,存储驱动程序将决定在何处创建该卷,而不取决于将使用该卷的 Pod。
|
||||
然后,调度程序将 Pod 调度到创建卷后可使用该卷的节点上。
|
||||
|
||||
对于 [CSI 临时卷](/zh/docs/concepts/storage/volumes/#csi),调度总是在不考虑存储容量的情况下进行。
|
||||
对于 [CSI 临时卷](/zh-cn/docs/concepts/storage/volumes/#csi),调度总是在不考虑存储容量的情况下进行。
|
||||
这是基于这样的假设:该卷类型仅由节点本地的特殊 CSI 驱动程序使用,并且不需要大量资源。
|
||||
|
||||
<!--
|
||||
|
||||
@@ -23,8 +23,8 @@ with [volumes](/docs/concepts/storage/volumes/) and
|
||||
[persistent volumes](/docs/concepts/storage/persistent-volumes) is suggested.
|
||||
-->
|
||||
本文描述了 Kubernetes 中 StorageClass 的概念。建议先熟悉
|
||||
[卷](/zh/docs/concepts/storage/volumes/)和
|
||||
[持久卷](/zh/docs/concepts/storage/persistent-volumes)的概念。
|
||||
[卷](/zh-cn/docs/concepts/storage/volumes/)和
|
||||
[持久卷](/zh-cn/docs/concepts/storage/persistent-volumes)的概念。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -74,7 +74,7 @@ for details.
|
||||
-->
|
||||
管理员可以为没有申请绑定到特定 StorageClass 的 PVC 指定一个默认的存储类:
|
||||
更多详情请参阅
|
||||
[PersistentVolumeClaim 章节](/zh/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
|
||||
[PersistentVolumeClaim 章节](/zh-cn/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims)。
|
||||
|
||||
```yaml
|
||||
apiVersion: storage.k8s.io/v1
|
||||
@@ -249,7 +249,7 @@ the class or PV, If a mount option is invalid, the PV mount fails.
|
||||
The `volumeBindingMode` field controls when [volume binding and dynamic
|
||||
provisioning](/docs/concepts/storage/persistent-volumes/#provisioning) should occur.
|
||||
-->
|
||||
`volumeBindingMode` 字段控制了[卷绑定和动态制备](/zh/docs/concepts/storage/persistent-volumes/#provisioning)
|
||||
`volumeBindingMode` 字段控制了[卷绑定和动态制备](/zh-cn/docs/concepts/storage/persistent-volumes/#provisioning)
|
||||
应该发生在什么时候。
|
||||
|
||||
<!--
|
||||
@@ -277,10 +277,10 @@ and [taints and tolerations](/docs/concepts/scheduling-eviction/taint-and-tolera
|
||||
集群管理员可以通过指定 `WaitForFirstConsumer` 模式来解决此问题。
|
||||
该模式将延迟 PersistentVolume 的绑定和制备,直到使用该 PersistentVolumeClaim 的 Pod 被创建。
|
||||
PersistentVolume 会根据 Pod 调度约束指定的拓扑来选择或制备。这些包括但不限于
|
||||
[资源需求](/zh/docs/concepts/configuration/manage-resources-containers/)、
|
||||
[节点筛选器](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)、
|
||||
[pod 亲和性和互斥性](/zh/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity/)、
|
||||
以及[污点和容忍度](/zh/docs/concepts/scheduling-eviction/taint-and-toleration)。
|
||||
[资源需求](/zh-cn/docs/concepts/configuration/manage-resources-containers/)、
|
||||
[节点筛选器](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector)、
|
||||
[pod 亲和性和互斥性](/zh-cn/docs/concepts/scheduling-eviction/assign-pod-node/#affinity-and-anti-affinity/)、
|
||||
以及[污点和容忍度](/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration)。
|
||||
|
||||
<!--
|
||||
The following plugins support `WaitForFirstConsumer` with dynamic provisioning:
|
||||
@@ -313,7 +313,7 @@ The following plugins support `WaitForFirstConsumer` with pre-created Persistent
|
||||
and pre-created PVs, but you'll need to look at the documentation for a specific CSI driver
|
||||
to see its supported topology keys and examples.
|
||||
-->
|
||||
动态配置和预先创建的 PV 也支持 [CSI卷](/zh/docs/concepts/storage/volumes/#csi),
|
||||
动态配置和预先创建的 PV 也支持 [CSI卷](/zh-cn/docs/concepts/storage/volumes/#csi),
|
||||
但是你需要查看特定 CSI 驱动程序的文档以查看其支持的拓扑键名和例子。
|
||||
|
||||
{{< note >}}
|
||||
@@ -770,7 +770,7 @@ vSphere 存储类有两种制备器
|
||||
[弃用](/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/#why-are-we-migrating-in-tree-plugins-to-csi)。
|
||||
更多关于 CSI 制备器的详情,请参阅
|
||||
[Kubernetes vSphere CSI 驱动](https://vsphere-csi-driver.sigs.k8s.io/)
|
||||
和 [vSphereVolume CSI 迁移](/zh/docs/concepts/storage/volumes/#csi-migration-5)。
|
||||
和 [vSphereVolume CSI 迁移](/zh-cn/docs/concepts/storage/volumes/#csi-migration-5)。
|
||||
|
||||
<!--
|
||||
#### CSI Provisioner {#vsphere-provisioner-csi}
|
||||
@@ -1209,8 +1209,8 @@ add the `create` permission of resource `secret` for clusterrole
|
||||
`system:controller:persistent-volume-binder`.
|
||||
-->
|
||||
在存储制备期间,为挂载凭证创建一个名为 `secretName` 的 Secret。如果集群同时启用了
|
||||
[RBAC](/zh/docs/reference/access-authn-authz/rbac/) 和
|
||||
[控制器角色](/zh/docs/reference/access-authn-authz/rbac/#controller-roles),
|
||||
[RBAC](/zh-cn/docs/reference/access-authn-authz/rbac/) 和
|
||||
[控制器角色](/zh-cn/docs/reference/access-authn-authz/rbac/#controller-roles),
|
||||
为 `system:controller:persistent-volume-binder` 的 clusterrole 添加
|
||||
`Secret` 资源的 `create` 权限。
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ You need to enable the `CSIVolumeHealth` [feature gate](/docs/reference/command-
|
||||
-->
|
||||
{{< note >}}
|
||||
你需要启用 `CSIVolumeHealth`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/),
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/),
|
||||
才能在节点上使用此特性。
|
||||
{{< /note >}}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ weight: 60
|
||||
This document describes the concept of cloning existing CSI Volumes in Kubernetes. Familiarity with [Volumes](/docs/concepts/storage/volumes) is suggested.
|
||||
-->
|
||||
本文档介绍 Kubernetes 中克隆现有 CSI 卷的概念。阅读前建议先熟悉
|
||||
[卷](/zh/docs/concepts/storage/volumes)。
|
||||
[卷](/zh-cn/docs/concepts/storage/volumes)。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ with [volume snapshots](/docs/concepts/storage/volume-snapshots/) and
|
||||
[storage classes](/docs/concepts/storage/storage-classes) is suggested.
|
||||
-->
|
||||
本文档描述了 Kubernetes 中 VolumeSnapshotClass 的概念。建议熟悉
|
||||
[卷快照(Volume Snapshots)](/zh/docs/concepts/storage/volume-snapshots/)和
|
||||
[存储类(Storage Class)](/zh/docs/concepts/storage/storage-classes)。
|
||||
[卷快照(Volume Snapshots)](/zh-cn/docs/concepts/storage/volume-snapshots/)和
|
||||
[存储类(Storage Class)](/zh-cn/docs/concepts/storage/storage-classes)。
|
||||
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -18,7 +18,7 @@ weight: 40
|
||||
In Kubernetes, a _VolumeSnapshot_ represents a snapshot of a volume on a storage system. This document assumes that you are already familiar with Kubernetes [persistent volumes](/docs/concepts/storage/persistent-volumes/).
|
||||
-->
|
||||
在 Kubernetes 中,卷快照是一个存储系统上卷的快照,本文假设你已经熟悉了 Kubernetes
|
||||
的 [持久卷](/zh/docs/concepts/storage/persistent-volumes/)。
|
||||
的 [持久卷](/zh-cn/docs/concepts/storage/persistent-volumes/)。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
@@ -118,7 +118,7 @@ Instead of using a pre-existing snapshot, you can request that a snapshot to be
|
||||
#### 动态的 {#dynamic}
|
||||
|
||||
可以从 `PersistentVolumeClaim` 中动态获取快照,而不用使用已经存在的快照。
|
||||
在获取快照时,[卷快照类](/zh/docs/concepts/storage/volume-snapshot-classes/)
|
||||
在获取快照时,[卷快照类](/zh-cn/docs/concepts/storage/volume-snapshot-classes/)
|
||||
指定要用的特定于存储提供程序的参数。
|
||||
|
||||
<!--
|
||||
@@ -196,7 +196,7 @@ using the attribute `volumeSnapshotClassName`. If nothing is set, then the defau
|
||||
`persistentVolumeClaimName` 是 `PersistentVolumeClaim` 数据源对快照的名称。
|
||||
这个字段是动态配置快照中的必填字段。
|
||||
|
||||
卷快照可以通过指定 [VolumeSnapshotClass](/zh/docs/concepts/storage/volume-snapshot-classes/)
|
||||
卷快照可以通过指定 [VolumeSnapshotClass](/zh-cn/docs/concepts/storage/volume-snapshot-classes/)
|
||||
使用 `volumeSnapshotClassName` 属性来请求特定类。如果没有设置,那么使用默认类(如果有)。
|
||||
|
||||
<!--
|
||||
@@ -353,4 +353,4 @@ For more details, see
|
||||
[Volume Snapshot and Restore Volume from Snapshot](/docs/concepts/storage/persistent-volumes/#volume-snapshot-and-restore-volume-from-snapshot-support).
|
||||
-->
|
||||
更多详细信息,请参阅
|
||||
[卷快照和从快照还原卷](/zh/docs/concepts/storage/persistent-volumes/#volume-snapshot-and-restore-volume-from-snapshot-support)。
|
||||
[卷快照和从快照还原卷](/zh-cn/docs/concepts/storage/persistent-volumes/#volume-snapshot-and-restore-volume-from-snapshot-support)。
|
||||
|
||||
@@ -332,7 +332,7 @@ must be installed on the cluster and the `CSIMigration` and `CSIMigrationAzureFi
|
||||
`file.csi.azure.com` 容器存储接口(CSI)驱动程序。要使用此特性,必须在集群中安装
|
||||
[Azure 文件 CSI 驱动程序](https://github.com/kubernetes-sigs/azurefile-csi-driver),
|
||||
并且 `CSIMigration` 和 `CSIMigrationAzureFile`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
必须被启用。
|
||||
|
||||
<!--
|
||||
@@ -449,7 +449,7 @@ must be installed on the cluster.
|
||||
为了使用此特性,必须在集群中安装
|
||||
[OpenStack Cinder CSI 驱动程序](https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md),
|
||||
你可以通过设置 `CSIMigrationOpenStack`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
为 `false` 来禁止 Cinder CSI 迁移。
|
||||
|
||||
<!--
|
||||
@@ -458,7 +458,7 @@ and the kubelet, you can enable the `InTreePluginOpenStackUnregister`
|
||||
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
|
||||
-->
|
||||
要禁止控制器管理器和 kubelet 加载树内 Cinder 插件,你可以启用
|
||||
`InTreePluginOpenStackUnregister` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
`InTreePluginOpenStackUnregister` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
|
||||
### configMap
|
||||
|
||||
@@ -468,7 +468,7 @@ provides a way to inject configuration data into Pods.
|
||||
The data stored in a ConfigMap object can be referenced in a volume of type
|
||||
`configMap` and then consumed by containerized applications running in a Pod.
|
||||
-->
|
||||
[`configMap`](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/)
|
||||
[`configMap`](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/)
|
||||
卷提供了向 Pod 注入配置数据的方法。
|
||||
ConfigMap 对象中存储的数据可以被 `configMap` 类型的卷引用,然后被 Pod 中运行的容器化应用使用。
|
||||
|
||||
@@ -524,7 +524,7 @@ keyed with `log_level`.
|
||||
* Text data is exposed as files using the UTF-8 character encoding. For other character encodings, use `binaryData`.
|
||||
-->
|
||||
{{< note >}}
|
||||
* 在使用 [ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/) 之前你首先要创建它。
|
||||
* 在使用 [ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/) 之前你首先要创建它。
|
||||
* 容器以 [subPath](#using-subpath) 卷挂载方式使用 ConfigMap 时,将无法接收 ConfigMap 的更新。
|
||||
* 文本数据挂载成文件时采用 UTF-8 字符编码。如果使用其他字符编码形式,可使用
|
||||
`binaryData` 字段。
|
||||
@@ -550,7 +550,7 @@ receive Downward API updates.
|
||||
<!--
|
||||
See the [`downwardAPI` volume example](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/) for more details.
|
||||
-->
|
||||
更多详细信息请参考 [`downwardAPI` 卷示例](/zh/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)。
|
||||
更多详细信息请参考 [`downwardAPI` 卷示例](/zh-cn/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)。
|
||||
|
||||
### emptyDir
|
||||
|
||||
@@ -612,7 +612,7 @@ backed volumes are sized to 50% of the memory on a Linux host.
|
||||
-->
|
||||
|
||||
{{< note >}}
|
||||
当启用 `SizeMemoryBackedVolumes` [特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
当启用 `SizeMemoryBackedVolumes` [特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)
|
||||
时,你可以为基于内存提供的卷指定大小。
|
||||
如果未指定大小,则基于内存的卷的大小为 Linux 主机上内存的 50%。
|
||||
{{< /note>}}
|
||||
@@ -818,7 +818,7 @@ Before creating a PersistentVolume, you must create the PD:
|
||||
-->
|
||||
#### 手动供应基于区域 PD 的 PersistentVolume {#manually-provisioning-regional-pd-pv}
|
||||
|
||||
使用[为 GCE PD 定义的存储类](/zh/docs/concepts/storage/storage-classes/#gce)
|
||||
使用[为 GCE PD 定义的存储类](/zh-cn/docs/concepts/storage/storage-classes/#gce)
|
||||
可以实现动态供应。在创建 PersistentVolume 之前,你首先要创建 PD。
|
||||
|
||||
```shell
|
||||
@@ -1063,7 +1063,7 @@ Watch out when using this type of volume, because:
|
||||
* 具有相同配置(例如基于同一 PodTemplate 创建)的多个 Pod
|
||||
会由于节点上文件的不同而在不同节点上有不同的行为。
|
||||
* 下层主机上创建的文件或目录只能由 root 用户写入。你需要在
|
||||
[特权容器](/zh/docs/tasks/configure-pod-container/security-context/)
|
||||
[特权容器](/zh-cn/docs/tasks/configure-pod-container/security-context/)
|
||||
中以 root 身份运行进程,或者修改主机上的文件权限以便容器能够写入 `hostPath` 卷。
|
||||
|
||||
<!--
|
||||
@@ -1264,7 +1264,7 @@ such as node resource requirements, node selectors, Pod affinity, and Pod anti-a
|
||||
-->
|
||||
使用 `local` 卷时,建议创建一个 StorageClass 并将其 `volumeBindingMode` 设置为
|
||||
`WaitForFirstConsumer`。要了解更多详细信息,请参考
|
||||
[local StorageClass 示例](/zh/docs/concepts/storage/storage-classes/#local)。
|
||||
[local StorageClass 示例](/zh-cn/docs/concepts/storage/storage-classes/#local)。
|
||||
延迟卷绑定的操作可以确保 Kubernetes 在为 PersistentVolumeClaim 作出绑定决策时,会评估
|
||||
Pod 可能具有的其他节点约束,例如:如节点资源需求、节点选择器、Pod亲和性和 Pod 反亲和性。
|
||||
|
||||
@@ -1324,7 +1324,7 @@ A `persistentVolumeClaim` volume is used to mount a
|
||||
are a way for users to "claim" durable storage (such as a GCE PersistentDisk or an
|
||||
iSCSI volume) without knowing the details of the particular cloud environment.
|
||||
-->
|
||||
`persistentVolumeClaim` 卷用来将[持久卷](/zh/docs/concepts/storage/persistent-volumes/)(PersistentVolume)挂载到 Pod 中。
|
||||
`persistentVolumeClaim` 卷用来将[持久卷](/zh-cn/docs/concepts/storage/persistent-volumes/)(PersistentVolume)挂载到 Pod 中。
|
||||
持久卷申领(PersistentVolumeClaim)是用户在不知道特定云环境细节的情况下“申领”持久存储(例如
|
||||
GCE PersistentDisk 或者 iSCSI 卷)的一种方法。
|
||||
|
||||
@@ -1332,7 +1332,7 @@ GCE PersistentDisk 或者 iSCSI 卷)的一种方法。
|
||||
See the [PersistentVolumes example](/docs/concepts/storage/persistent-volumes/) for more
|
||||
details.
|
||||
-->
|
||||
更多详情请参考[持久卷示例](/zh/docs/concepts/storage/persistent-volumes/)。
|
||||
更多详情请参考[持久卷示例](/zh-cn/docs/concepts/storage/persistent-volumes/)。
|
||||
|
||||
### portworxVolume {#portworxvolume}
|
||||
|
||||
@@ -1395,7 +1395,7 @@ For more details, see the [Portworx volume](https://github.com/kubernetes/exampl
|
||||
A projected volume maps several existing volume sources into the same
|
||||
directory. For more details, see [projected volumes](/docs/concepts/storage/projected-volumes/).
|
||||
-->
|
||||
投射卷能将若干现有的卷来源映射到同一目录上。更多详情请参考[投射卷](/zh/docs/concepts/storage/projected-volumes/)。
|
||||
投射卷能将若干现有的卷来源映射到同一目录上。更多详情请参考[投射卷](/zh-cn/docs/concepts/storage/projected-volumes/)。
|
||||
|
||||
### quobyte (已弃用) {#quobyte}
|
||||
|
||||
@@ -1483,7 +1483,7 @@ must be enabled.
|
||||
`rbd.csi.ceph.com` {{<glossary_tooltip text="CSI" term_id="csi" >}} 驱动程序。
|
||||
要使用该特性,必须在集群内安装
|
||||
[Ceph CSI 驱动](https://github.com/ceph/ceph-csi),并启用 `CSIMigration` 和 `csiMigrationRBD`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
|
||||
<!--
|
||||
As a Kubernetes cluster operator that administers storage, here are the
|
||||
@@ -1546,7 +1546,7 @@ receive Secret updates.
|
||||
<!--
|
||||
For more details, see [Configuring Secrets](/docs/concepts/configuration/secret/).
|
||||
-->
|
||||
更多详情请参考[配置 Secrets](/zh/docs/concepts/configuration/secret/)。
|
||||
更多详情请参考[配置 Secrets](/zh-cn/docs/concepts/configuration/secret/)。
|
||||
|
||||
### storageOS (已弃用) {#storageos}
|
||||
|
||||
@@ -1666,7 +1666,7 @@ must be installed on the cluster and the `CSIMigration` and `CSIMigrationvSphere
|
||||
为了使用此功能特性,必须在集群中安装
|
||||
[vSphere CSI 驱动](https://github.com/kubernetes-sigs/vsphere-csi-driver),并启用
|
||||
`CSIMigration` 和 `CSIMigrationvSphere`
|
||||
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/)。
|
||||
|
||||
<!--
|
||||
You can find additional advice on how to migrate in VMware's
|
||||
@@ -1875,7 +1875,7 @@ To learn about requesting space using a resource specification, see
|
||||
[how to manage resources](/docs/concepts/configuration/manage-resources-containers/).
|
||||
-->
|
||||
要了解如何使用资源规约来请求空间,可参考
|
||||
[如何管理资源](/zh/docs/concepts/configuration/manage-resources-containers/)。
|
||||
[如何管理资源](/zh-cn/docs/concepts/configuration/manage-resources-containers/)。
|
||||
|
||||
|
||||
<!--
|
||||
@@ -1969,9 +1969,9 @@ if the driver supports that (beta feature)
|
||||
`csi` 卷可以在 Pod 中以三种方式使用:
|
||||
|
||||
* 通过 PersistentVolumeClaim(#persistentvolumeclaim) 对象引用
|
||||
* 使用[一般性的临时卷](/zh/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volume)
|
||||
* 使用[一般性的临时卷](/zh-cn/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volume)
|
||||
(Alpha 特性)
|
||||
* 使用 [CSI 临时卷](/zh/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volume),
|
||||
* 使用 [CSI 临时卷](/zh-cn/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volume),
|
||||
前提是驱动支持这种用法(Beta 特性)
|
||||
|
||||
<!--
|
||||
@@ -2101,7 +2101,7 @@ You can set up your
|
||||
[PersistentVolume/PersistentVolumeClaim with raw block volume support](/docs/concepts/storage/persistent-volumes/#raw-block-volume-support) as usual, without any CSI specific changes.
|
||||
-->
|
||||
你可以和以前一样,安装自己的
|
||||
[带有原始块卷支持的 PV/PVC](/zh/docs/concepts/storage/persistent-volumes/#raw-block-volume-support),
|
||||
[带有原始块卷支持的 PV/PVC](/zh-cn/docs/concepts/storage/persistent-volumes/#raw-block-volume-support),
|
||||
采用 CSI 对此过程没有影响。
|
||||
|
||||
<!--
|
||||
@@ -2120,7 +2120,7 @@ for more information.
|
||||
-->
|
||||
你可以直接在 Pod 规约中配置 CSI 卷。采用这种方式配置的卷都是临时卷,
|
||||
无法在 Pod 重新启动后继续存在。
|
||||
进一步的信息可参阅[临时卷](/zh/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volume)。
|
||||
进一步的信息可参阅[临时卷](/zh-cn/docs/concepts/storage/ephemeral-volumes/#csi-ephemeral-volume)。
|
||||
|
||||
<!--
|
||||
For more information on how to develop a CSI driver, refer to the
|
||||
@@ -2359,5 +2359,5 @@ sudo systemctl restart docker
|
||||
<!--
|
||||
Follow an example of [deploying WordPress and MySQL with Persistent Volumes](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/).
|
||||
-->
|
||||
参考[使用持久卷部署 WordPress 和 MySQL](/zh/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) 示例。
|
||||
参考[使用持久卷部署 WordPress 和 MySQL](/zh-cn/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/) 示例。
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ As a result, the following storage functionality is not supported on Windows nod
|
||||
* 块设备映射
|
||||
* 内存作为存储介质(例如 `emptyDir.medium` 设置为 `Memory`)
|
||||
* 类似 UID/GID、各用户不同的 Linux 文件系统访问许可等文件系统特性
|
||||
* 使用 [DefaultMode 设置 Secret 权限](/zh/docs/concepts/configuration/secret/#secret-files-permissions)
|
||||
* 使用 [DefaultMode 设置 Secret 权限](/zh-cn/docs/concepts/configuration/secret/#secret-files-permissions)
|
||||
(因为该特性依赖 UID/GID)
|
||||
* 基于 NFS 的存储和卷支持
|
||||
* 扩展已挂载卷(resizefs)
|
||||
@@ -97,7 +97,7 @@ Volume management components are shipped as Kubernetes volume
|
||||
[plugin](/docs/concepts/storage/volumes/#types-of-volumes).
|
||||
The following broad classes of Kubernetes volume plugins are supported on Windows:
|
||||
-->
|
||||
卷管理组件作为 Kubernetes 卷[插件](/zh/docs/concepts/storage/volumes/#types-of-volumes)发布。
|
||||
卷管理组件作为 Kubernetes 卷[插件](/zh-cn/docs/concepts/storage/volumes/#types-of-volumes)发布。
|
||||
Windows 支持以下类型的 Kubernetes 卷插件:
|
||||
|
||||
<!--
|
||||
@@ -105,9 +105,9 @@ Windows 支持以下类型的 Kubernetes 卷插件:
|
||||
* Please note that FlexVolumes have been deprecated as of 1.23
|
||||
* [`CSI Plugins`](/docs/concepts/storage/volumes/#csi)
|
||||
-->
|
||||
* [`FlexVolume plugins`](/zh/docs/concepts/storage/volumes/#flexVolume)
|
||||
* [`FlexVolume plugins`](/zh-cn/docs/concepts/storage/volumes/#flexVolume)
|
||||
* 请注意自 1.23 版本起,FlexVolume 已被弃用
|
||||
* [`CSI Plugins`](/zh/docs/concepts/storage/volumes/#csi)
|
||||
* [`CSI Plugins`](/zh-cn/docs/concepts/storage/volumes/#csi)
|
||||
|
||||
<!--
|
||||
##### In-tree volume plugins
|
||||
@@ -125,8 +125,8 @@ The following in-tree plugins support persistent storage on Windows nodes:
|
||||
* [`gcePersistentDisk`](/docs/concepts/storage/volumes/#gcepersistentdisk)
|
||||
* [`vsphereVolume`](/docs/concepts/storage/volumes/#vspherevolume)
|
||||
-->
|
||||
* [`awsElasticBlockStore`](/zh/docs/concepts/storage/volumes/#awselasticblockstore)
|
||||
* [`azureDisk`](/zh/docs/concepts/storage/volumes/#azuredisk)
|
||||
* [`azureFile`](/zh/docs/concepts/storage/volumes/#azurefile)
|
||||
* [`gcePersistentDisk`](/zh/docs/concepts/storage/volumes/#gcepersistentdisk)
|
||||
* [`vsphereVolume`](/zh/docs/concepts/storage/volumes/#vspherevolume)
|
||||
* [`awsElasticBlockStore`](/zh-cn/docs/concepts/storage/volumes/#awselasticblockstore)
|
||||
* [`azureDisk`](/zh-cn/docs/concepts/storage/volumes/#azuredisk)
|
||||
* [`azureFile`](/zh-cn/docs/concepts/storage/volumes/#azurefile)
|
||||
* [`gcePersistentDisk`](/zh-cn/docs/concepts/storage/volumes/#gcepersistentdisk)
|
||||
* [`vsphereVolume`](/zh-cn/docs/concepts/storage/volumes/#vspherevolume)
|
||||
Reference in New Issue
Block a user