Skip to content

Commit ae74fa0

Browse files
committed
[zh-cn]sync storage-limits volumes
Signed-off-by: xin.li
1 parent 3afa6a4 commit ae74fa0

File tree

2 files changed

+85
-25
lines changed

2 files changed

+85
-25
lines changed

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

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Kubernetes 调度器对挂接到一个节点的卷数有默认限制:
5050
Google Persistent Disk16
5151
Microsoft Azure Disk Storage16
5252
53-
-->
53+
-->
5454
<table>
5555
<tr><th>云服务th><th>每节点最大卷数th>tr>
5656
<tr><td><a href="https://aws.amazon.com/ebs/">Amazon Elastic Block Store (EBS)a>td><td>39td>tr>
@@ -143,3 +143,62 @@ Refer to the [CSI specifications](https://github.com/container-storage-interface
143143
参考 [CSI 规范](https://github.com/container-storage-interface/spec/blob/master/spec.md#nodegetinfo)获取更多详细信息。
144144

145145
* 对于由已迁移到 CSI 驱动的树内插件管理的卷,最大卷数将是 CSI 驱动报告的卷数。
146+
147+
150+
### 可变的 CSI 节点可分配数 {#mutable-csi-node-allocatable-count}
151+
152+
{{< feature-state state="alpha" for_k8s_version="v1.33" >}}
153+
154+
157+
CSI 驱动可以在运行时动态调整可以挂载到 Node 的最大卷数量。
158+
这提高了调度准确性,并减少了由于资源可用性变化导致的 Pod 调度失败。
159+
160+
165+
这是一个 Alpha 级别特性,默认情况下是禁用的。
166+
167+
要使用此特性,你必须在以下组件上启用 `MutableCSINodeAllocatableCount`
168+
特性门控:
169+
170+
- `kube-apiserver`
171+
- `kubelet`
172+
173+
178+
#### 定期更新
179+
180+
当启用时,CSI 驱动可以通过在 `CSIDriver` 规约中设置
181+
`nodeAllocatableUpdatePeriodSeconds` 字段来请求定期更新其卷限制。
182+
例如:
183+
184+
```yaml
185+
apiVersion: storage.k8s.io/v1
186+
kind: CSIDriver
187+
metadata:
188+
name: hostpath.csi.k8s.io
189+
spec:
190+
nodeAllocatableUpdatePeriodSeconds: 60
191+
```
192+
193+
196+
kubelet 将使用 `nodeAllocatableUpdatePeriodSeconds`
197+
中指定的时间间隔,定期调用相应的 CSI 驱动的 `NodeGetInfo`
198+
端点来刷新可挂接卷的最大数量。此字段允许的最小值为 10 秒。
199+
200+
203+
此外,如果卷挂接操作失败并返回 `ResourceExhausted` 错误(gRPC 代码 8),
204+
Kubernetes 会立即触发对该 Node 的可分配卷数量的更新。

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

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -588,13 +588,13 @@ Kubernetes 项目建议你转为使用
588588

589589
{{< warning >}}
590590
597-
`gitRepo` 卷类型已经被弃用
597+
`gitRepo` 卷插件已经被弃用且默认禁用
598598

599599
如果需要制备已挂载 Git 仓库的 Pod,你可以将
600600
[EmptyDir](#emptydir) 卷挂载到 [Init 容器](/zh-cn/docs/concepts/workloads/pods/init-containers/)中,
@@ -618,6 +618,15 @@ part of a policy to reject use of `gitRepo` volumes:
618618
```
619619
{{< /warning >}}
620620

621+
626+
如果你明确启用 `GitRepoVolumeDriver`
627+
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/),
628+
你可以在集群中使用这个已废弃的存储插件。
629+
621630
10931104
此外:
10941105

1095-
- 不支持容器使用子路径挂载(`spec.containers[*].volumeMounts.subpath`)。
1106+
- 从 Kubernetes v1.33 开始,才支持容器的 [`subPath`](/zh-cn/docs/concepts/storage/volumes/#using-subpath) 或
1107+
[`subPathExpr`](/zh-cn/docs/concepts/storage/volumes/#using-subpath-expanded-environment)
1108+
挂载(`spec.containers[*].volumeMounts.[subPath,subPathExpr]`)。
10961109
- `spec.securityContext.fsGroupChangePolicy` 字段对这种卷没有效果。
10971110
- [`AlwaysPullImages` 准入控制器](/zh-cn/docs/reference/access-authn-authz/admission-controllers/#alwayspullimages)也适用于此卷源,
10981111
就像适用于容器镜像一样。
@@ -1450,30 +1463,18 @@ For more details, see the
14501463
-->
14511464
#### Portworx CSI 迁移
14521465

1453-
{{< feature-state for_k8s_version="v1.25" state="beta" >}}
1466+
{{< feature-state feature_gate_name="CSIMigrationPortworx" >}}
14541467

14551468
1469-
默认情况下,Kubernetes {{% skew currentVersion %}} 尝试将传统的 Portworx 卷迁移为使用 CSI。
1470-
(Portworx 的 CSI 迁移自 Kubernetes v1.23 版本以来一直可用,但从 v1.31 版本开始才默认启用)。
1471-
如果你想禁用自动迁移,可以将 `CSIMigrationPortworx`
1472-
[特性门控](/zh-cn/docs/reference/command-line-tools-reference/feature-gates/) 设置为 `false`;
1473-
你需要在 kube-controller-manager **和**每个相关的 kubelet 上进行此更改。
1474-
1475-
它将所有插件操作不再指向树内插件(In-Tree Plugin),转而指向
1476-
`pxd.portworx.com` 容器存储接口(Container Storage Interface,CSI)驱动。
1475+
在 Kubernetes {{% skew currentVersion %}} 中,默认情况下,
1476+
所有针对树内 Portworx 卷的操作都会被重定向到
1477+
`pxd.portworx.com` 容器存储接口(CSI)驱动。
14771478
[Portworx CSI 驱动程序](https://docs.portworx.com/portworx-enterprise/operations/operate-kubernetes/storage-operations/csi)必须安装在集群上。
14781479

14791480
commit comments
Comments
 (0)