Skip to content

Commit 4f72955

Browse files
authored
Merge pull request #41368 from asa3311/sync-cheatsheet.md-and-extensible-admission-controllers.md-and-abac.md
[zh-cn] sync cheatsheet.md and extensible-admission-controllers.md and abac.md
2 parents e483d95 + 9abc50a commit 4f72955

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

content/zh-cn/docs/reference/access-authn-authz/abac.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ kubectl 使用 apiserver 的 `/api` 和 `/apis` 端点来发现服务资源类
249249
```
250250

251251
<!--
252-
[Complete file example](https://releases.k8s.io/{{< param "fullversion" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
252+
[Complete file example](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
253253

254254
## A quick note on service accounts
255255

@@ -260,7 +260,7 @@ system:serviceaccount:<namespace>:<serviceaccountname>
260260
```
261261

262262
-->
263-
[完整文件示例](https://releases.k8s.io/{{< param "fullversion" >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
263+
[完整文件示例](https://releases.k8s.io/v{{< skew currentPatchVersion >}}/pkg/auth/authorizer/abac/example_policy_file.jsonl)
264264

265265
## 服务帐户的快速说明 {#a-quick-note-on-service-accounts}
266266

content/zh-cn/docs/reference/access-authn-authz/extensible-admission-controllers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ webhooks:
211211
{{< note >}}
212212
<!--
213213
You must replace the `<CA_BUNDLE>` in the above example by a valid CA bundle
214-
which is a PEM-encoded CA bundle for validating the webhook's server certificate.
214+
which is a PEM-encoded (field value is Base64 encoded) CA bundle for validating the webhook's server certificate.
215215
-->
216216
你必须在以上示例中将 `<CA_BUNDLE>` 替换为一个有效的 CA 证书包,
217-
这是一个用 PEM 编码的 CA 证书包,用于校验 Webhook 的服务器证书。
217+
这是一个用 PEM 编码的(字段值是 Base64 编码) CA 证书包,用于校验 Webhook 的服务器证书。
218218
{{< /note >}}
219219

220220
<!--

content/zh-cn/docs/reference/kubectl/cheatsheet.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ card:
2525
This page contains a list of commonly used `kubectl` commands and flags.
2626
-->
2727

28+
{{< note >}}
29+
<!--
30+
These instructions are for Kubernetes v{{< skew currentVersion >}}. To check the version, use the `kubectl version` command.
31+
-->
32+
这些指令适用于 Kubernetes v{{< skew currentVersion >}}。要检查版本,请使用 `kubectl version` 命令。
33+
{{< /note >}}
34+
2835
本页列举了常用的 `kubectl` 命令和标志。
2936

3037
<!-- body -->
@@ -520,7 +527,9 @@ kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl
520527
521528
kubectl label pods my-pod new-label=awesome # Add a Label
522529
kubectl label pods my-pod new-label- # Remove a label
530+
kubectl label pods my-pod new-label=new-value --overwrite # Overwrite an existing value
523531
kubectl annotate pods my-pod icon-url=http://goo.gl/XXBTWq # Add an annotation
532+
kubectl annotate pods my-pod icon- # Remove annotation
524533
kubectl autoscale deployment foo --min=2 --max=10 # Auto scale a deployment "foo"
525534
```
526535
-->
@@ -545,7 +554,9 @@ kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl
545554

546555
kubectl label pods my-pod new-label=awesome # 添加标签
547556
kubectl label pods my-pod new-label- # 移除标签
557+
kubectl label pods my-pod new-label=new-value --overwrite # 覆盖现有的值
548558
kubectl annotate pods my-pod icon-url=http://goo.gl/XXBTWq # 添加注解
559+
kubectl annotate pods my-pod icon- # 移除标签
549560
kubectl autoscale deployment foo --min=2 --max=10 # 对 "foo" Deployment 自动伸缩容
550561
```
551562

@@ -826,9 +837,12 @@ kubectl taint nodes foo dedicated=special-user:NoSchedule
826837
### 资源类型 {#resource-types}
827838

828839
<!--
829-
List all supported resource types along with their shortnames, [API group](/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), whether they are [namespaced](/docs/concepts/overview/working-with-objects/namespaces), and [Kind](/docs/concepts/overview/working-with-objects/kubernetes-objects):
840+
List all supported resource types along with their shortnames, [API group](/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), whether they are [namespaced](/docs/concepts/overview/working-with-objects/namespaces), and [kind](/docs/concepts/overview/working-with-objects/):
830841
-->
831-
列出所支持的全部资源类型和它们的简称、[API 组](/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning), 是否是[名字空间作用域](/zh-cn/docs/concepts/overview/working-with-objects/namespaces)[Kind](/zh-cn/docs/concepts/overview/working-with-objects/kubernetes-objects)
842+
列出所支持的全部资源类型和它们的简称、
843+
[API 组](/zh-cn/docs/concepts/overview/kubernetes-api/#api-groups-and-versioning),
844+
是否是[名字空间作用域](/zh-cn/docs/concepts/overview/working-with-objects/namespaces)
845+
[Kind](/zh-cn/docs/concepts/overview/working-with-objects/)
832846

833847
```bash
834848
kubectl api-resources

0 commit comments

Comments
 (0)