Skip to content

Commit 07c8c36

Browse files
authored
Merge pull request #41555 from Zhuzhenghao/volume-health-monitoring
[zh] resync volume-health-monitoring & storage-classes
2 parents 0badfb2 + 0d93456 commit 07c8c36

File tree

2 files changed

+76
-43
lines changed

2 files changed

+76
-43
lines changed

content/zh-cn/docs/concepts/storage/storage-classes.md

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,22 @@ for provisioning PVs. This field must be specified.
103103
| Volume Plugin | Internal Provisioner | Config Example |
104104
-->
105105
106-
| 卷插件 | 内置制备器 | 配置示例 |
107-
| :------------------- | :------------------: | :-----------------------------------: |
108-
| AWSElasticBlockStore | ✓ | [AWS EBS](#aws-ebs) |
109-
| AzureFile | ✓ | [Azure File](#azure-file) |
110-
| AzureDisk | ✓ | [Azure Disk](#azure-disk) |
111-
| CephFS | - | - |
112-
| Cinder | ✓ | [OpenStack Cinder](#openstack-cinder) |
113-
| FC | - | - |
114-
| FlexVolume | - | - |
115-
| GCEPersistentDisk | ✓ | [GCE PD](#gce-pd) |
116-
| iSCSI | - | - |
117-
| NFS | - | [NFS](#nfs) |
118-
| RBD | ✓ | [Ceph RBD](#ceph-rbd) |
119-
| VsphereVolume | ✓ | [vSphere](#vsphere) |
120-
| PortworxVolume | ✓ | [Portworx Volume](#portworx-volume) |
121-
| Local | - | [Local](#local) |
106+
| 卷插件 | 内置制备器 | 配置示例 |
107+
| :------------------- | :--------: | :-----------------------------------: |
108+
| AWSElasticBlockStore | ✓ | [AWS EBS](#aws-ebs) |
109+
| AzureFile | ✓ | [Azure File](#azure-file) |
110+
| AzureDisk | ✓ | [Azure Disk](#azure-disk) |
111+
| CephFS | - | - |
112+
| Cinder | ✓ | [OpenStack Cinder](#openstack-cinder) |
113+
| FC | - | - |
114+
| FlexVolume | - | - |
115+
| GCEPersistentDisk | ✓ | [GCE PD](#gce-pd) |
116+
| iSCSI | - | - |
117+
| NFS | - | [NFS](#nfs) |
118+
| RBD | ✓ | [Ceph RBD](#ceph-rbd) |
119+
| VsphereVolume | ✓ | [vSphere](#vsphere) |
120+
| PortworxVolume | ✓ | [Portworx Volume](#portworx-volume) |
121+
| Local | - | [Local](#local) |
122122
123123
<!--
124124
You are not restricted to specifying the "internal" provisioners
@@ -155,7 +155,8 @@ vendors provide their own external provisioner.
155155
### Reclaim Policy
156156
157157
PersistentVolumes that are dynamically created by a StorageClass will have the
158-
reclaim policy specified in the `reclaimPolicy` field of the class, which can be
158+
[reclaim policy](/docs/concepts/storage/persistent-volumes/#reclaiming)
159+
specified in the `reclaimPolicy` field of the class, which can be
159160
either `Delete` or `Retain`. If no `reclaimPolicy` is specified when a
160161
StorageClass object is created, it will default to `Delete`.
161162

@@ -164,8 +165,10 @@ whatever reclaim policy they were assigned at creation.
164165
-->
165166
### 回收策略 {#reclaim-policy}
166167

167-
由 StorageClass 动态创建的 PersistentVolume 会在类的 `reclaimPolicy` 字段中指定回收策略,可以是
168-
`Delete` 或者 `Retain`。如果 StorageClass 对象被创建时没有指定 `reclaimPolicy`,它将默认为 `Delete`。
168+
由 StorageClass 动态创建的 PersistentVolume 会在类的
169+
[reclaimPolicy](/zh-cn/docs/concepts/storage/persistent-volumes/#reclaiming)
170+
字段中指定回收策略,可以是 `Delete` 或者 `Retain`。
171+
如果 StorageClass 对象被创建时没有指定 `reclaimPolicy`,它将默认为 `Delete`。
169172

170173
通过 StorageClass 手动创建并管理的 PersistentVolume 会使用它们被创建时指定的回收策略。
171174

@@ -236,8 +239,9 @@ the class or PV. If a mount option is invalid, the PV mount fails.
236239
### 卷绑定模式 {#volume-binding-mode}
237240

238241
<!--
239-
The `volumeBindingMode` field controls when [volume binding and dynamic
240-
provisioning](/docs/concepts/storage/persistent-volumes/#provisioning) should occur. When unset, "Immediate" mode is used by default.
242+
The `volumeBindingMode` field controls when
243+
[volume binding and dynamic provisioning](/docs/concepts/storage/persistent-volumes/#provisioning)
244+
should occur. When unset, "Immediate" mode is used by default.
241245
-->
242246
`volumeBindingMode`
243247
字段控制了[卷绑定和动态制备](/zh-cn/docs/concepts/storage/persistent-volumes/#provisioning)应该发生在什么时候。
@@ -310,7 +314,8 @@ to see its supported topology keys and examples.
310314
{{< note >}}
311315
<!--
312316
If you choose to use `WaitForFirstConsumer`, do not use `nodeName` in the Pod spec
313-
to specify node affinity. If `nodeName` is used in this case, the scheduler will be bypassed and PVC will remain in `pending` state.
317+
to specify node affinity.
318+
If `nodeName` is used in this case, the scheduler will be bypassed and PVC will remain in `pending` state.
314319

315320
Instead, you can use node selector for hostname in this case as shown below.
316321
-->
@@ -493,6 +498,7 @@ parameters:
493498
where Kubernetes cluster has a node. `zone` and `zones` parameters must not
494499
be used at the same time.
495500
- `fstype`: `ext4` or `xfs`. Default: `ext4`. The defined filesystem type must be supported by the host operating system.
501+
496502
- `replication-type`: `none` or `regional-pd`. Default: `none`.
497503
-->
498504
- `type`:`pd-standard` 或者 `pd-ssd`。默认:`pd-standard`
@@ -561,11 +567,12 @@ parameters:
561567
- `readOnly`:是否将存储挂载为只读的标志(默认为 false)。
562568

563569
<!--
564-
Kubernetes doesn't include an internal NFS provisioner. You need to use an external provisioner to create a StorageClass for NFS.
570+
Kubernetes doesn't include an internal NFS provisioner.
571+
You need to use an external provisioner to create a StorageClass for NFS.
565572
Here are some examples:
566573

567-
* [NFS Ganesha server and external provisioner](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner)
568-
* [NFS subdir external provisioner](https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner)
574+
- [NFS Ganesha server and external provisioner](https://github.com/kubernetes-sigs/nfs-ganesha-server-and-external-provisioner)
575+
- [NFS subdir external provisioner](https://github.com/kubernetes-sigs/nfs-subdir-external-provisioner)
569576
-->
570577
Kubernetes 不包含内部 NFS 驱动。你需要使用外部驱动为 NFS 创建 StorageClass。
571578
这里有些例子:
@@ -591,10 +598,11 @@ parameters:
591598
- `availability`:可用区域。如果没有指定,通常卷会在 Kubernetes 集群节点所在的活动区域中轮转调度。
592599

593600
{{< note >}}
601+
{{< feature-state state="deprecated" for_k8s_version="v1.11" >}}
594602
<!--
595-
This internal provisioner of OpenStack is deprecated. Please use [the external cloud provider for OpenStack](https://github.com/kubernetes/cloud-provider-openstack).
603+
This internal provisioner of OpenStack is deprecated. Please use
604+
[the external cloud provider for OpenStack](https://github.com/kubernetes/cloud-provider-openstack).
596605
-->
597-
{{< feature-state state="deprecated" for_k8s_version="v1.11" >}}
598606
OpenStack 的内部驱动已经被弃用。请使用
599607
[OpenStack 的外部云驱动](https://github.com/kubernetes/cloud-provider-openstack)。
600608
{{< /note >}}
@@ -607,7 +615,10 @@ There are two types of provisioners for vSphere storage classes:
607615
- [CSI provisioner](#vsphere-provisioner-csi): `csi.vsphere.vmware.com`
608616
- [vCP provisioner](#vcp-provisioner): `kubernetes.io/vsphere-volume`
609617

610-
In-tree provisioners are [deprecated](/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/#why-are-we-migrating-in-tree-plugins-to-csi). For more information on the CSI provisioner, see [Kubernetes vSphere CSI Driver](https://vsphere-csi-driver.sigs.k8s.io/) and [vSphereVolume CSI migration](/docs/concepts/storage/volumes/#vsphere-csi-migration).
618+
In-tree provisioners are [deprecated](/blog/2019/12/09/kubernetes-1-17-feature-csi-migration-beta/#why-are-we-migrating-in-tree-plugins-to-csi).
619+
For more information on the CSI provisioner, see
620+
[Kubernetes vSphere CSI Driver](https://vsphere-csi-driver.sigs.k8s.io/) and
621+
[vSphereVolume CSI migration](/docs/concepts/storage/volumes/#vsphere-csi-migration).
611622
-->
612623
vSphere 存储类有两种制备器:
613624

@@ -623,7 +634,8 @@ vSphere 存储类有两种制备器:
623634
<!--
624635
#### CSI Provisioner {#vsphere-provisioner-csi}
625636

626-
The vSphere CSI StorageClass provisioner works with Tanzu Kubernetes clusters. For an example, refer to the [vSphere CSI repository](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/example/vanilla-k8s-RWM-filesystem-volumes/example-sc.yaml).
637+
The vSphere CSI StorageClass provisioner works with Tanzu Kubernetes clusters.
638+
For an example, refer to the [vSphere CSI repository](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/example/vanilla-k8s-RWM-filesystem-volumes/example-sc.yaml).
627639
-->
628640
#### CSI 制备器 {#vsphere-provisioner-csi}
629641

content/zh-cn/docs/concepts/storage/volume-health-monitoring.md

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,33 @@ weight: 100
1818

1919
{{< feature-state for_k8s_version="v1.21" state="alpha" >}}
2020

21-
<!--
22-
{{< glossary_tooltip text="CSI" term_id="csi" >}} volume health monitoring allows CSI Drivers to detect abnormal volume conditions from the underlying storage systems and report them as events on {{< glossary_tooltip text="PVCs" term_id="persistent-volume-claim" >}} or {{< glossary_tooltip text="Pods" term_id="pod" >}}.
21+
<!--
22+
{{< glossary_tooltip text="CSI" term_id="csi" >}} volume health monitoring allows
23+
CSI Drivers to detect abnormal volume conditions from the underlying storage systems
24+
and report them as events on {{< glossary_tooltip text="PVCs" term_id="persistent-volume-claim" >}}
25+
or {{< glossary_tooltip text="Pods" term_id="pod" >}}.
2326
-->
2427
{{< glossary_tooltip text="CSI" term_id="csi" >}} 卷健康监测支持 CSI 驱动从底层的存储系统着手,
2528
探测异常的卷状态,并以事件的形式上报到 {{< glossary_tooltip text="PVCs" term_id="persistent-volume-claim" >}}
2629
或 {{< glossary_tooltip text="Pods" term_id="pod" >}}.
2730

2831
<!-- body -->
2932

30-
<!--
33+
<!--
3134
## Volume health monitoring
3235
-->
3336
## 卷健康监测 {#volume-health-monitoring}
3437

35-
<!--
36-
Kubernetes _volume health monitoring_ is part of how Kubernetes implements the Container Storage Interface (CSI). Volume health monitoring feature is implemented in two components: an External Health Monitor controller, and the {{< glossary_tooltip term_id="kubelet" text="kubelet" >}}.
38+
<!--
39+
Kubernetes _volume health monitoring_ is part of how Kubernetes implements the
40+
Container Storage Interface (CSI). Volume health monitoring feature is implemented
41+
in two components: an External Health Monitor controller, and the
42+
{{< glossary_tooltip term_id="kubelet" text="kubelet" >}}.
3743
38-
If a CSI Driver supports Volume Health Monitoring feature from the controller side, an event will be reported on the related {{< glossary_tooltip text="PersistentVolumeClaim" term_id="persistent-volume-claim" >}} (PVC) when an abnormal volume condition is detected on a CSI volume.
44+
If a CSI Driver supports Volume Health Monitoring feature from the controller side,
45+
an event will be reported on the related
46+
{{< glossary_tooltip text="PersistentVolumeClaim" term_id="persistent-volume-claim" >}} (PVC)
47+
when an abnormal volume condition is detected on a CSI volume.
3948
-->
4049
Kubernetes _卷健康监测_ 是 Kubernetes 容器存储接口(CSI)实现的一部分。
4150
卷健康监测特性由两个组件实现:外部健康监测控制器和 {{< glossary_tooltip term_id="kubelet" text="kubelet" >}}。
@@ -45,24 +54,36 @@ Kubernetes _卷健康监测_ 是 Kubernetes 容器存储接口(CSI)实现的
4554
中上报一个事件。
4655

4756
<!--
48-
The External Health Monitor {{< glossary_tooltip text="controller" term_id="controller" >}} also watches for node failure events. You can enable node failure monitoring by setting the `enable-node-watcher` flag to true. When the external health monitor detects a node failure event, the controller reports an Event will be reported on the PVC to indicate that pods using this PVC are on a failed node.
57+
The External Health Monitor {{< glossary_tooltip text="controller" term_id="controller" >}}
58+
also watches for node failure events. You can enable node failure monitoring by setting
59+
the `enable-node-watcher` flag to true. When the external health monitor detects a node
60+
failure event, the controller reports an Event will be reported on the PVC to indicate
61+
that pods using this PVC are on a failed node.
4962
50-
If a CSI Driver supports Volume Health Monitoring feature from the node side, an Event will be reported on every Pod using the PVC when an abnormal volume condition is detected on a CSI volume. In addition, Volume Health information is exposed as Kubelet VolumeStats metrics. A new metric kubelet_volume_stats_health_status_abnormal is added. This metric includes two labels: `namespace` and `persistentvolumeclaim`. The count is either 1 or 0. 1 indicates the volume is unhealthy, 0 indicates volume is healthy. For more information, please check [KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1432-volume-health-monitor#kubelet-metrics-changes).
63+
If a CSI Driver supports Volume Health Monitoring feature from the node side,
64+
an Event will be reported on every Pod using the PVC when an abnormal volume
65+
condition is detected on a CSI volume. In addition, Volume Health information
66+
is exposed as Kubelet VolumeStats metrics. A new metric kubelet_volume_stats_health_status_abnormal
67+
is added. This metric includes two labels: `namespace` and `persistentvolumeclaim`.
68+
The count is either 1 or 0. 1 indicates the volume is unhealthy, 0 indicates volume
69+
is healthy. For more information, please check
70+
[KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1432-volume-health-monitor#kubelet-metrics-changes).
5171
-->
5272
外部健康监测{{< glossary_tooltip text="控制器" term_id="controller" >}}也会监测节点失效事件。
5373
如果要启动节点失效监测功能,你可以设置标志 `enable-node-watcher``true`
5474
当外部健康监测器检测到节点失效事件,控制器会报送一个事件,该事件会在 PVC 上继续上报,
5575
以表明使用此 PVC 的 Pod 正位于一个失效的节点上。
5676

5777
如果 CSI 驱动程序支持节点测的卷健康检测,那当在 CSI 卷上检测到异常卷时,
58-
会在使用该 PVC 的每个Pod 上触发一个事件。
78+
会在使用该 PVC 的每个 Pod 上触发一个事件。
5979
此外,卷运行状况信息作为 Kubelet VolumeStats 指标公开。
6080
添加了一个新的指标 kubelet_volume_stats_health_status_abnormal。
6181
该指标包括两个标签:`namespace``persistentvolumeclaim`
6282
计数为 1 或 0。1 表示卷不正常,0 表示卷正常。更多信息请访问[KEP](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1432-volume-health-monitor#kubelet-metrics-changes)
6383

64-
<!--
65-
You need to enable the `CSIVolumeHealth` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to use this feature from the node side.
84+
<!--
85+
You need to enable the `CSIVolumeHealth` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
86+
to use this feature from the node side.
6687
-->
6788
{{< note >}}
6889
你需要启用 `CSIVolumeHealth`
@@ -72,9 +93,9 @@ You need to enable the `CSIVolumeHealth` [feature gate](/docs/reference/command-
7293

7394
## {{% heading "whatsnext" %}}
7495

75-
<!--
76-
See the [CSI driver documentation](https://kubernetes-csi.github.io/docs/drivers.html) to find out which CSI drivers have implemented this feature.
96+
<!--
97+
See the [CSI driver documentation](https://kubernetes-csi.github.io/docs/drivers.html)
98+
to find out which CSI drivers have implemented this feature.
7799
-->
78100
参阅 [CSI 驱动程序文档](https://kubernetes-csi.github.io/docs/drivers.html)
79101
可以找出有哪些 CSI 驱动程序实现了此特性。
80-

0 commit comments

Comments
 (0)