File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
content/zh-cn/docs/tasks/manage-kubernetes-objects Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -637,19 +637,24 @@ kubectl patch deployment patch-demo --patch '{"spec": {"template": {"spec": {"co
637
637
638
638
647
- 使用 kubectl 命令(如 get、patch、edit 和 replace)时带上 ` --subresource=[subresource-name] ` 标志,
648
- 可以获取和更新资源的 ` status ` 和 ` scale ` 子资源(适用于 kubectl v1.24 或更高版本)。
649
- 这个标志可用于带有 ` status ` 或 ` scale ` 子资源的所有 API 资源 (内置资源和 CR 资源)。
650
- Deployment 是支持这些子资源的其中一个例子。
649
+ 使用 kubectl 命令(如 get、patch、edit、apply 和 replace)时带上 ` --subresource=[subresource-name] ` 标志,
650
+ 可以获取和更新你所指定资源的 ` status ` 、` scale ` 和 ` resize ` 子资源。
651
+ 你可以为任何具有 ` status ` 、` scale ` 或 ` resize ` 子资源的 Kubernetes API 资源(内置资源和 CR 资源)
652
+ 指定子资源。
653
+
654
+ 例如,Deployment 具有 ` status ` 子资源和 ` scale ` 子资源,因此你可以使用 ` kubectl ` 来获取或修改
655
+ Deployment 的 ` status ` 子资源。
651
656
652
- 下面是有两个副本的 Deployment 的清单。
657
+ 以下是一个具有两个副本的 Deployment 的清单示例:
653
658
654
659
{{% code_sample file="application/deployment.yaml" %}}
655
660
You can’t perform that action at this time.
0 commit comments