From f69311fc48fc8d59182711105d5c2541f25bf884 Mon Sep 17 00:00:00 2001 From: zyy19981018 <76578326+zyy19981018@users.noreply.github.com> Date: Thu, 5 May 2022 18:50:20 +0800 Subject: [PATCH] [zh]Update content/zh/docs/reference/kubectl/conventions.md (#33483) * [zh]Update content/zh/docs/reference/kubectl/conventions.md * Update content/zh/docs/reference/kubectl/conventions.md Co-authored-by: Qiming Teng * Update conventions.md * Update conventions.md * Update conventions.md Co-authored-by: Qiming Teng --- .../zh/docs/reference/kubectl/conventions.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/zh/docs/reference/kubectl/conventions.md b/content/zh/docs/reference/kubectl/conventions.md index bddbec7e03..78aa374a7c 100644 --- a/content/zh/docs/reference/kubectl/conventions.md +++ b/content/zh/docs/reference/kubectl/conventions.md @@ -43,6 +43,25 @@ For a stable output in a script: * 完全限定版本。例如 `jobs.v1.batch/myjob`。这将确保 kubectl 不会使用其默认版本,该版本会随着时间的推移而更改。 * 不要依赖上下文、首选项或其他隐式状态。 + +## 子资源 {#subresources} + + + +* 你可以将 `--subresource` alpha 标志用于 kubectl 命令,例如 `get`、`patch`、`edit` 和 `replace` + 来获取和更新所有支持子资源的资源的子资源。 目前,仅支持 `status` 和 `scale` 子资源。 +* 针对子资源的 API 协定与完整资源相同。在更新`status` 子资源为一个新值时,请记住, + 子资源可能是潜在的由控制器调和为不同的值。 +