From d2492b5322d03130d7b335b0501e5adbf7fdf51a Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Sat, 9 Dec 2023 22:48:05 +0800 Subject: [PATCH] [zh-cn] sync secret cheatsheet php-apache.yaml Signed-off-by: xin.li --- content/zh-cn/docs/concepts/configuration/secret.md | 4 ++-- content/zh-cn/docs/reference/kubectl/cheatsheet.md | 2 +- content/zh-cn/examples/application/hpa/php-apache.yaml | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/content/zh-cn/docs/concepts/configuration/secret.md b/content/zh-cn/docs/concepts/configuration/secret.md index ba68b02a2f646..0d463587de0e1 100644 --- a/content/zh-cn/docs/concepts/configuration/secret.md +++ b/content/zh-cn/docs/concepts/configuration/secret.md @@ -705,7 +705,7 @@ TLS Secret 的一种典型用法是为 [Ingress](/zh-cn/docs/concepts/services-n 提供 TLS 类型的 Secret 仅仅是出于方便性考虑。 你可以创建 `Opaque` 类型的 Secret 来保存用于 TLS 身份认证的凭据。 -不过,使用已定义和公开的 Secret 类型有助于确保你自己项目中的 Secret 格式的一致性。 +不过,使用已定义和公开的 Secret 类型(`kubernetes.io/tls`)有助于确保你自己项目中的 Secret 格式的一致性。 API 服务器会验证这种类型的 Secret 是否设定了所需的主键。 要使用 `kubectl` 创建 TLS Secret,你可以使用 `tls` 子命令: diff --git a/content/zh-cn/docs/reference/kubectl/cheatsheet.md b/content/zh-cn/docs/reference/kubectl/cheatsheet.md index b63c4b7651ba0..1889d71141a50 100644 --- a/content/zh-cn/docs/reference/kubectl/cheatsheet.md +++ b/content/zh-cn/docs/reference/kubectl/cheatsheet.md @@ -700,7 +700,7 @@ kubectl logs my-pod # dump pod logs (stdout) kubectl logs -l name=myLabel # dump pod logs, with label name=myLabel (stdout) kubectl logs my-pod --previous # dump pod logs (stdout) for a previous instantiation of a container kubectl logs my-pod -c my-container # dump pod container logs (stdout, multi-container case) -kubectl logs -l name=myLabel -c my-container # dump pod logs, with label name=myLabel (stdout) +kubectl logs -l name=myLabel -c my-container # dump pod container logs, with label name=myLabel (stdout) kubectl logs my-pod -c my-container --previous # dump pod container logs (stdout, multi-container case) for a previous instantiation of a container kubectl logs -f my-pod # stream pod logs (stdout) kubectl logs -f my-pod -c my-container # stream pod container logs (stdout, multi-container case) diff --git a/content/zh-cn/examples/application/hpa/php-apache.yaml b/content/zh-cn/examples/application/hpa/php-apache.yaml index f3f1ef5d4f912..1c49aca6a1ff5 100644 --- a/content/zh-cn/examples/application/hpa/php-apache.yaml +++ b/content/zh-cn/examples/application/hpa/php-apache.yaml @@ -1,4 +1,4 @@ -apiVersion: autoscaling/v1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: php-apache @@ -9,4 +9,10 @@ spec: name: php-apache minReplicas: 1 maxReplicas: 10 - targetCPUUtilizationPercentage: 50 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 50