From 602a2e0121d79e1937912809d7ce6ef4813154c7 Mon Sep 17 00:00:00 2001 From: xin gu <418294249@qq.com> Date: Wed, 17 Jan 2024 22:05:25 +0800 Subject: [PATCH] sync configure-service-account horizontal-pod-autoscale-walkthrough install-kubectl-macos Update install-kubectl-macos.md --- .../configure-pod-container/configure-service-account.md | 8 ++++---- .../horizontal-pod-autoscale-walkthrough.md | 9 +++++++++ content/zh-cn/docs/tasks/tools/install-kubectl-macos.md | 6 +++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/content/zh-cn/docs/tasks/configure-pod-container/configure-service-account.md b/content/zh-cn/docs/tasks/configure-pod-container/configure-service-account.md index 21f76bec46..475e027b96 100644 --- a/content/zh-cn/docs/tasks/configure-pod-container/configure-service-account.md +++ b/content/zh-cn/docs/tasks/configure-pod-container/configure-service-account.md @@ -303,7 +303,7 @@ token might be shorter, or could even be longer). 当启用了 `ServiceAccountTokenNodeBinding` 和 `ServiceAccountTokenNodeBindingValidation` @@ -315,7 +315,7 @@ KUBECTL_NODE_BOUND_TOKENS=true kubectl create token build-robot --bound-object-k ``` 此令牌将有效直至其过期或关联的 `Node` 或服务账户被删除。 @@ -476,7 +476,7 @@ Next, verify it has been created. For example: 所描述的,生成一个镜像拉取 Secret: ```shell - kubectl create secret docker-registry myregistrykey --docker-server=DUMMY_SERVER \ + kubectl create secret docker-registry myregistrykey --docker-server= \ --docker-username=DUMMY_USERNAME --docker-password=DUMMY_DOCKER_PASSWORD \ --docker-email=DUMMY_DOCKER_EMAIL ``` @@ -578,7 +578,7 @@ ServiceAccount, the new Pod has its `spec.imagePullSecrets` field set automatica 新 Pod 的 `spec.imagePullSecrets` 会被自动设置。 ```shell -kubectl run nginx --image=nginx --restart=Never +kubectl run nginx --image=/nginx --restart=Never kubectl get pod nginx -o=jsonpath='{.spec.imagePullSecrets[0].name}{"\n"}' ``` diff --git a/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md b/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md index ccfc0a7a44..7cf807be88 100644 --- a/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md +++ b/content/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough.md @@ -89,6 +89,15 @@ Kubernetes Metrics Server 从集群中的 {{}}, run the following command to enable metrics-server: +--> +如果你正在运行 {{< glossary_tooltip term_id="minikube" >}},运行以下命令以启用 metrics-server: + +```shell +minikube addons enable metrics-server +``` + -1. 安装插件后,清理安装文件: +1. 安装并验证 kubectl 后,删除校验和文件: ```bash - rm kubectl kubectl.sha256 + rm kubectl.sha256 ```