[zh]Update tasks pages(part-6) for links with '/zh/' prefix, using new prefix '/zh-cn/'
parent
e0d6f94bf6
commit
0b113f23aa
|
@ -27,7 +27,7 @@ This page shows how to perform a rollback on a {{< glossary_tooltip term_id="dae
|
|||
You should already know how to [perform a rolling update on a
|
||||
DaemonSet](/docs/tasks/manage-daemon/update-daemon-set/).
|
||||
-->
|
||||
你应该已经了解如何[为 DaemonSet 执行滚东更新](/zh/docs/tasks/manage-daemon/update-daemon-set/)。
|
||||
你应该已经了解如何[为 DaemonSet 执行滚东更新](/zh-cn/docs/tasks/manage-daemon/update-daemon-set/)。
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
|
@ -231,4 +231,4 @@ have revision 1 and 2 in the system, and roll back from revision 2 to revision
|
|||
-->
|
||||
## 故障排查
|
||||
|
||||
* 参阅 [DaemonSet 滚动升级故障排除](/zh/docs/tasks/manage-daemon/update-daemon-set/#troubleshooting)。
|
||||
* 参阅 [DaemonSet 滚动升级故障排除](/zh-cn/docs/tasks/manage-daemon/update-daemon-set/#troubleshooting)。
|
||||
|
|
|
@ -72,9 +72,9 @@ You may want to set
|
|||
|
||||
-->
|
||||
你可能想设置
|
||||
[`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/zh/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec) (默认为 1),
|
||||
[`.spec.minReadySeconds`](/zh/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec) (默认为 0) 和
|
||||
[`.spec.updateStrategy.rollingUpdate.maxSurge`](/zh/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec)
|
||||
[`.spec.updateStrategy.rollingUpdate.maxUnavailable`](/zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec) (默认为 1),
|
||||
[`.spec.minReadySeconds`](/zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec) (默认为 0) 和
|
||||
[`.spec.updateStrategy.rollingUpdate.maxSurge`](/zh-cn/docs/reference/kubernetes-api/workload-resources/daemon-set-v1/#DaemonSetSpec)
|
||||
(一种 Beta 阶段的特性,默认为 0)。
|
||||
|
||||
<!--
|
||||
|
@ -170,7 +170,7 @@ use `kubectl apply`:
|
|||
#### 声明式命令 {#declarative-commands}
|
||||
|
||||
如果你使用
|
||||
[配置文件](/zh/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
[配置文件](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
来更新 DaemonSet,请使用 `kubectl apply`:
|
||||
|
||||
```shell
|
||||
|
@ -187,7 +187,7 @@ use `kubectl edit`:
|
|||
#### 指令式命令 {#imperative-commands}
|
||||
|
||||
如果你使用
|
||||
[指令式命令](/zh/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
[指令式命令](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
来更新 DaemonSets,请使用 `kubectl edit`:
|
||||
|
||||
```shell
|
||||
|
@ -260,7 +260,7 @@ When this happens, find the nodes that don't have the DaemonSet pods scheduled o
|
|||
by comparing the output of `kubectl get nodes` and the output of:
|
||||
-->
|
||||
DaemonSet 滚动更新可能会卡住,其 Pod 至少在某个节点上无法调度运行。
|
||||
当节点上[可用资源耗尽](/zh/docs/concepts/scheduling-eviction/node-pressure-eviction/)时,
|
||||
当节点上[可用资源耗尽](/zh-cn/docs/concepts/scheduling-eviction/node-pressure-eviction/)时,
|
||||
这是可能的。
|
||||
|
||||
发生这种情况时,通过对 `kubectl get nodes` 和下面命令行的输出作比较,
|
||||
|
@ -284,7 +284,7 @@ either.
|
|||
{{< note >}}
|
||||
当所删除的 Pod 不受任何控制器管理,也不是多副本的 Pod时,上述操作将导致服务中断。
|
||||
同时,上述操作也不会考虑
|
||||
[PodDisruptionBudget](/zh/docs/tasks/run-application/configure-pdb/)
|
||||
[PodDisruptionBudget](/zh-cn/docs/tasks/run-application/configure-pdb/)
|
||||
所施加的约束。
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -337,6 +337,6 @@ kubectl delete ds fluentd-elasticsearch -n kube-system
|
|||
* See [Performing a rollback on a DaemonSet](/docs/tasks/manage-daemon/rollback-daemon-set/)
|
||||
* See [Creating a DaemonSet to adopt existing DaemonSet pods](/docs/concepts/workloads/controllers/daemonset/)
|
||||
-->
|
||||
* 查看[在 DaemonSet 上执行回滚](/zh/docs/tasks/manage-daemon/rollback-daemon-set/)
|
||||
* 查看[创建 DaemonSet 以收养现有 DaemonSet Pod](/zh/docs/concepts/workloads/controllers/daemonset/)
|
||||
* 查看[在 DaemonSet 上执行回滚](/zh-cn/docs/tasks/manage-daemon/rollback-daemon-set/)
|
||||
* 查看[创建 DaemonSet 以收养现有 DaemonSet Pod](/zh-cn/docs/concepts/workloads/controllers/daemonset/)
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ For example:
|
|||
## 集群内存在不同类型的 GPU
|
||||
|
||||
如果集群内部的不同节点上有不同类型的 NVIDIA GPU,那么你可以使用
|
||||
[节点标签和节点选择器](/zh/docs/tasks/configure-pod-container/assign-pods-nodes/)
|
||||
[节点标签和节点选择器](/zh-cn/docs/tasks/configure-pod-container/assign-pods-nodes/)
|
||||
来将 pod 调度到合适的节点上。
|
||||
|
||||
例如:
|
||||
|
|
|
@ -28,7 +28,7 @@ preview of what changes `apply` will make.
|
|||
<!--
|
||||
Install [`kubectl`](/docs/tasks/tools/).
|
||||
-->
|
||||
安装 [`kubectl`](/zh/docs/tasks/tools/)。
|
||||
安装 [`kubectl`](/zh-cn/docs/tasks/tools/)。
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
|
@ -55,7 +55,7 @@ for a discussion of the advantages and disadvantage of each kind of object manag
|
|||
* 声明式对象配置
|
||||
|
||||
关于每种对象管理的优缺点的讨论,可参见
|
||||
[Kubernetes 对象管理](/zh/docs/concepts/overview/working-with-objects/object-management/)。
|
||||
[Kubernetes 对象管理](/zh-cn/docs/concepts/overview/working-with-objects/object-management/)。
|
||||
|
||||
<!--
|
||||
## Overview
|
||||
|
@ -72,8 +72,8 @@ the following documents if you have not already:
|
|||
声明式对象管理需要用户对 Kubernetes 对象定义和配置有比较深刻的理解。
|
||||
如果你还没有这方面的知识储备,请先阅读下面的文档:
|
||||
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件对 Kubernetes 对象进行指令式管理](/zh/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件对 Kubernetes 对象进行指令式管理](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
|
||||
<!--
|
||||
Following are definitions for terms used in this document:
|
||||
|
@ -157,12 +157,12 @@ See [Dry-Run Authorization](/docs/reference/using-api/api-concepts#dry-run-autho
|
|||
for details.
|
||||
-->
|
||||
{{< note >}}
|
||||
`diff` 使用[服务器端试运行(Server-side Dry-run)](/zh/docs/reference/using-api/api-concepts/#dry-run)
|
||||
`diff` 使用[服务器端试运行(Server-side Dry-run)](/zh-cn/docs/reference/using-api/api-concepts/#dry-run)
|
||||
功能特性;而该功能特性需要在 `kube-apiserver` 上启用。
|
||||
|
||||
由于 `diff` 操作会使用试运行模式执行服务器端 apply 请求,因此需要为
|
||||
用户配置 `PATCH`、`CREATE` 和 `UPDATE` 操作权限。
|
||||
参阅[试运行授权](/zh/docs/reference/using-api/api-concepts#dry-run-authorization)
|
||||
参阅[试运行授权](/zh-cn/docs/reference/using-api/api-concepts#dry-run-authorization)
|
||||
了解详情。
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -1547,8 +1547,8 @@ template:
|
|||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
-->
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件对 Kubernetes 对象执行指令式管理](/zh/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件对 Kubernetes 对象执行指令式管理](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [Kubectl 命令参考](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API 参考](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ Kubernetes 对象。本文档解释这些命令的组织方式以及如何使用
|
|||
<!--
|
||||
Install [`kubectl`](/docs/tasks/tools/).
|
||||
-->
|
||||
安装[`kubectl`](/zh/docs/tasks/tools/)。
|
||||
安装[`kubectl`](/zh-cn/docs/tasks/tools/)。
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
|
@ -50,7 +50,7 @@ for a discussion of the advantages and disadvantage of each kind of object manag
|
|||
* 声明式对象配置
|
||||
|
||||
关于每种对象管理的优缺点的讨论,可参见
|
||||
[Kubernetes 对象管理](/zh/docs/concepts/overview/working-with-objects/object-management/)。
|
||||
[Kubernetes 对象管理](/zh-cn/docs/concepts/overview/working-with-objects/object-management/)。
|
||||
|
||||
<!--
|
||||
## How to create objects
|
||||
|
@ -288,8 +288,8 @@ kubectl create --edit -f /tmp/srv.yaml
|
|||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
-->
|
||||
* [使用指令式对象配置管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [使用声明式对象配置管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [使用指令式对象配置管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [使用声明式对象配置管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubectl 命令参考](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API 参考](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ This document explains how to define and manage objects using configuration file
|
|||
<!--
|
||||
Install [`kubectl`](/docs/tasks/tools/).
|
||||
-->
|
||||
安装 [`kubectl`](/zh/docs/tasks/tools/) 。
|
||||
安装 [`kubectl`](/zh-cn/docs/tasks/tools/) 。
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
|
@ -51,7 +51,7 @@ The `kubectl` tool supports three kinds of object management:
|
|||
See [Kubernetes Object Management](/docs/concepts/overview/working-with-objects/object-management/)
|
||||
for a discussion of the advantages and disadvantage of each kind of object management.
|
||||
-->
|
||||
参看 [Kubernetes 对象管理](/zh/docs/concepts/overview/working-with-objects/object-management/)
|
||||
参看 [Kubernetes 对象管理](/zh-cn/docs/concepts/overview/working-with-objects/object-management/)
|
||||
中关于每种对象管理的优缺点的讨论。
|
||||
|
||||
<!--
|
||||
|
@ -273,8 +273,8 @@ template:
|
|||
* [Kubectl Command Reference](/docs/reference/generated/kubectl/kubectl/)
|
||||
* [Kubernetes API Reference](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
-->
|
||||
* [使用命令式命令管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用对象配置管理 Kubernetes 对象 (声明式)](/zh/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [使用命令式命令管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用对象配置管理 Kubernetes 对象 (声明式)](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubectl 命令参考](/docs/reference/generated/kubectl/kubectl-commands/)
|
||||
* [Kubernetes API 参考](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/)
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ kubectl apply -k <kustomization_directory>
|
|||
<!--
|
||||
Install [`kubectl`](/docs/tasks/tools/).
|
||||
-->
|
||||
安装 [`kubectl`](/zh/docs/tasks/tools/).
|
||||
安装 [`kubectl`](/zh-cn/docs/tasks/tools/).
|
||||
|
||||
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
|
||||
|
||||
|
|
|
@ -673,8 +673,8 @@ Strategic merge patch is not supported for custom resources.
|
|||
* [Imperative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/imperative-config/)
|
||||
* [Declarative Management of Kubernetes Objects Using Configuration Files](/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
-->
|
||||
* [Kubernetes 对象管理](/zh/docs/concepts/overview/working-with-objects/object-management/)
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件执行 Kubernetes 对象的指令式管理](/zh/docs/tasks/manage-kubernetes-objects/imperative-config)
|
||||
* [使用配置文件对 Kubernetes 对象进行声明式管理](/zh/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
* [Kubernetes 对象管理](/zh-cn/docs/concepts/overview/working-with-objects/object-management/)
|
||||
* [使用指令式命令管理 Kubernetes 对象](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-command/)
|
||||
* [使用配置文件执行 Kubernetes 对象的指令式管理](/zh-cn/docs/tasks/manage-kubernetes-objects/imperative-config)
|
||||
* [使用配置文件对 Kubernetes 对象进行声明式管理](/zh-cn/docs/tasks/manage-kubernetes-objects/declarative-config/)
|
||||
|
||||
|
|
|
@ -26,10 +26,10 @@ This document shares how to validate IPv4/IPv6 dual-stack enabled Kubernetes clu
|
|||
-->
|
||||
* 提供程序对双协议栈网络的支持 (云供应商或其他方式必须能够为 Kubernetes 节点
|
||||
提供可路由的 IPv4/IPv6 网络接口)
|
||||
* 一个能够支持[双协议栈](/zh/docs/concepts/services-networking/dual-stack/)的
|
||||
[网络插件](/zh/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)。
|
||||
* 一个能够支持[双协议栈](/zh-cn/docs/concepts/services-networking/dual-stack/)的
|
||||
[网络插件](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/network-plugins/)。
|
||||
|
||||
* [启用双协议栈](/zh/docs/concepts/services-networking/dual-stack/) 集群
|
||||
* [启用双协议栈](/zh-cn/docs/concepts/services-networking/dual-stack/) 集群
|
||||
|
||||
{{< version-check >}}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ one of the official [client libraries](/docs/reference/using-api/client-librarie
|
|||
libraries can automatically discover the API server and authenticate.
|
||||
-->
|
||||
从 Pod 使用 Kubernetes API 的最简单的方法就是使用官方的
|
||||
[客户端库](/zh/docs/reference/using-api/client-libraries/)。
|
||||
[客户端库](/zh-cn/docs/reference/using-api/client-libraries/)。
|
||||
这些库可以自动发现 API 服务器并进行身份验证。
|
||||
|
||||
<!--
|
||||
|
@ -73,7 +73,7 @@ securely with the API server.
|
|||
函数 `config.load_incluster_config()` 自动处理 API 主机的发现和身份认证。
|
||||
参见[这里的一个例子](https://github.com/kubernetes-client/python/blob/master/examples/in_cluster_config.py)。
|
||||
|
||||
- 还有一些其他可用的客户端库,请参阅[客户端库](/zh/docs/reference/using-api/client-libraries/)页面。
|
||||
- 还有一些其他可用的客户端库,请参阅[客户端库](/zh-cn/docs/reference/using-api/client-libraries/)页面。
|
||||
|
||||
在以上场景中,客户端库都使用 Pod 的服务账号凭据来与 API 服务器安全地通信。
|
||||
|
||||
|
@ -100,7 +100,7 @@ service account is placed into the filesystem tree of each container in that Pod
|
|||
at `/var/run/secrets/kubernetes.io/serviceaccount/token`.
|
||||
-->
|
||||
向 API 服务器进行身份认证的推荐做法是使用
|
||||
[服务账号](/zh/docs/tasks/configure-pod-container/configure-service-account/)凭据。
|
||||
[服务账号](/zh-cn/docs/tasks/configure-pod-container/configure-service-account/)凭据。
|
||||
默认情况下,每个 Pod 与一个服务账号关联,该服务账户的凭证(令牌)放置在此 Pod 中
|
||||
每个容器的文件系统树中的 `/var/run/secrets/kubernetes.io/serviceaccount/token` 处。
|
||||
|
||||
|
@ -132,7 +132,7 @@ in the Pod can use it directly.
|
|||
#### 使用 kubectl proxy {#use-kubectl-proxy}
|
||||
|
||||
如果你希望不使用官方客户端库就完成 API 查询,可以将 `kubectl proxy` 作为
|
||||
[command](/zh/docs/tasks/inject-data-application/define-command-argument-container/)
|
||||
[command](/zh-cn/docs/tasks/inject-data-application/define-command-argument-container/)
|
||||
在 Pod 中启动一个边车(Sidecar)容器。这样,`kubectl proxy` 自动完成对 API
|
||||
的身份认证,并将其暴露到 Pod 的 `localhost` 接口,从而 Pod 中的其他容器可以
|
||||
直接使用 API。
|
||||
|
|
|
@ -37,9 +37,9 @@ nodes.
|
|||
Pod Disruption Budgets.
|
||||
-->
|
||||
* 你是 Kubernetes 集群中某应用的所有者,该应用有高可用要求。
|
||||
* 你应了解如何部署[无状态应用](/zh/docs/tasks/run-application/run-stateless-application-deployment/)
|
||||
和/或[有状态应用](/zh/docs/tasks/run-application/run-replicated-stateful-application/)。
|
||||
* 你应当已经阅读过关于 [Pod 干扰](/zh/docs/concepts/workloads/pods/disruptions/) 的文档。
|
||||
* 你应了解如何部署[无状态应用](/zh-cn/docs/tasks/run-application/run-stateless-application-deployment/)
|
||||
和/或[有状态应用](/zh-cn/docs/tasks/run-application/run-replicated-stateful-application/)。
|
||||
* 你应当已经阅读过关于 [Pod 干扰](/zh-cn/docs/concepts/workloads/pods/disruptions/) 的文档。
|
||||
* 用户应当与集群所有者或服务提供者确认其遵从 Pod 干扰预算(Pod Disruption Budgets)的规则。
|
||||
|
||||
<!-- steps -->
|
||||
|
@ -87,7 +87,7 @@ selector goes into the PDBs `.spec.selector`.
|
|||
From version 1.15 PDBs support custom controllers where the [scale subresource](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#scale-subresource) is enabled.
|
||||
-->
|
||||
从 1.15 版本开始,PDB 支持启用
|
||||
[scale 子资源](/zh/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#scale-subresource)
|
||||
[scale 子资源](/zh-cn/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#scale-subresource)
|
||||
的自定义控制器。
|
||||
|
||||
<!--
|
||||
|
|
|
@ -97,7 +97,7 @@ Deleting the Pods in a StatefulSet will not delete the associated volumes. This
|
|||
### 持久卷 {#persistent-volumes}
|
||||
|
||||
删除 StatefulSet 管理的 Pod 并不会删除关联的卷。这是为了确保你有机会在删除卷之前从卷中复制数据。
|
||||
在 Pod 离开[终止状态](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
|
||||
在 Pod 离开[终止状态](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)
|
||||
后删除 PVC 可能会触发删除背后的 PV 持久卷,具体取决于存储类和回收策略。
|
||||
永远不要假定在 PVC 删除后仍然能够访问卷。
|
||||
|
||||
|
@ -140,13 +140,13 @@ If you find that some pods in your StatefulSet are stuck in the 'Terminating' or
|
|||
如果你发现 StatefulSet 的某些 Pod 长时间处于 'Terminating' 或者 'Unknown' 状态,
|
||||
则可能需要手动干预以强制从 API 服务器中删除这些 Pod。
|
||||
这是一项有点危险的任务。详细信息请阅读
|
||||
[删除 StatefulSet 类型的 Pods](/zh/docs/tasks/run-application/force-delete-stateful-set-pod/)。
|
||||
[删除 StatefulSet 类型的 Pods](/zh-cn/docs/tasks/run-application/force-delete-stateful-set-pod/)。
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
<!--
|
||||
Learn more about [force deleting StatefulSet Pods](/docs/tasks/run-application/force-delete-stateful-set-pod/).
|
||||
-->
|
||||
进一步了解[强制删除 StatefulSet 的 Pods](/zh/docs/tasks/run-application/force-delete-stateful-set-pod/)。
|
||||
进一步了解[强制删除 StatefulSet 的 Pods](/zh-cn/docs/tasks/run-application/force-delete-stateful-set-pod/)。
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ In normal operation of a StatefulSet, there is **never** a need to force delete
|
|||
## StatefulSet 注意事项
|
||||
|
||||
在 StatefulSet 的正常操作中,**永远不**需要强制删除 StatefulSet 管理的 Pod。
|
||||
[StatefulSet 控制器](/zh/docs/concepts/workloads/controllers/statefulset/)负责创建、
|
||||
[StatefulSet 控制器](/zh-cn/docs/concepts/workloads/controllers/statefulset/)负责创建、
|
||||
扩缩和删除 StatefulSet 管理的 Pods。它尝试确保指定数量的从序数 0 到 N-1 的 Pod
|
||||
处于活跃状态并准备就绪。StatefulSet 确保在任何时候,集群中最多只有一个具有给定标识的 Pod。
|
||||
这就是所谓的由 StatefulSet 提供的*最多一个(At Most One)*的语义。
|
||||
|
@ -73,7 +73,7 @@ For the above to lead to graceful termination, the Pod **must not** specify a `p
|
|||
为了让上面操作能够体面地终止 Pod,Pod **一定不能** 设置 `pod.Spec.TerminationGracePeriodSeconds` 为 0。
|
||||
将 `pod.Spec.TerminationGracePeriodSeconds` 设置为 0s 的做法是不安全的,强烈建议 StatefulSet 类型的
|
||||
Pod 不要使用。体面删除是安全的,并且会在 kubelet 从 API 服务器中删除资源名称之前确保
|
||||
[体面地结束 pod ](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)。
|
||||
[体面地结束 pod ](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination)。
|
||||
|
||||
<!--
|
||||
A Pod is not deleted automatically when a Node is unreachable.
|
||||
|
@ -85,7 +85,7 @@ The only ways in which a Pod in such a state can be removed from the apiserver a
|
|||
-->
|
||||
当某个节点不可达时,不会引发自动删除 Pod。
|
||||
在无法访问的节点上运行的 Pod 在
|
||||
[超时](/zh/docs/concepts/architecture/nodes/#condition)
|
||||
[超时](/zh-cn/docs/concepts/architecture/nodes/#condition)
|
||||
后会进入'Terminating' 或者 'Unknown' 状态。
|
||||
当用户尝试体面地删除无法访问的节点上的 Pod 时 Pod 也可能会进入这些状态。
|
||||
从 API 服务器上删除处于这些状态 Pod 的仅有可行方法如下:
|
||||
|
@ -95,7 +95,7 @@ The only ways in which a Pod in such a state can be removed from the apiserver a
|
|||
* The kubelet on the unresponsive Node starts responding, kills the Pod and removes the entry from the apiserver.<br/>
|
||||
* Force deletion of the Pod by the user.
|
||||
-->
|
||||
* 删除 Node 对象(要么你来删除, 要么[节点控制器](/zh/docs/concepts/architecture/nodes/#node-controller)
|
||||
* 删除 Node 对象(要么你来删除, 要么[节点控制器](/zh-cn/docs/concepts/architecture/nodes/#node-controller)
|
||||
来删除)
|
||||
* 无响应节点上的 kubelet 开始响应,杀死 Pod 并从 API 服务器上移除 Pod 对象
|
||||
* 用户强制删除 pod
|
||||
|
@ -171,6 +171,6 @@ Always perform force deletion of StatefulSet Pods carefully and with complete kn
|
|||
<!--
|
||||
Learn more about [debugging a StatefulSet](/docs/tasks/debug/debug-application/debug-statefulset/).
|
||||
-->
|
||||
进一步了解[调试 StatefulSet](/zh/docs/tasks/debug/debug-application/debug-statefulset/)。
|
||||
进一步了解[调试 StatefulSet](/zh-cn/docs/tasks/debug/debug-application/debug-statefulset/)。
|
||||
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ This is different from _vertical_ scaling, which for Kubernetes would mean
|
|||
assigning more resources (for example: memory or CPU) to the Pods that are already
|
||||
running for the workload.
|
||||
-->
|
||||
[HorizontalPodAutoscaler](/zh/docs/tasks/run-application/horizontal-pod-autoscale/) (简称 HPA )
|
||||
[HorizontalPodAutoscaler](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/) (简称 HPA )
|
||||
自动更新工作负载资源(例如 {{< glossary_tooltip text="Deployment" term_id="deployment" >}} 或者
|
||||
{{< glossary_tooltip text="StatefulSet" term_id="statefulset" >}}),
|
||||
目的是自动扩缩工作负载以满足需求。
|
||||
|
@ -66,7 +66,7 @@ release of Kubernetes, refer to the version of the documentation for that releas
|
|||
[available documentation versions](/docs/home/supported-doc-versions/)).
|
||||
-->
|
||||
如果你运行的是旧版本的 Kubernetes,请参阅该版本的文档版本
|
||||
([可用的文档版本](/zh/docs/home/supported-doc-versions/))。
|
||||
([可用的文档版本](/zh-cn/docs/home/supported-doc-versions/))。
|
||||
|
||||
<!--
|
||||
To follow this walkthrough, you also need to use a cluster that has a
|
||||
|
@ -83,8 +83,8 @@ To learn how to deploy the Metrics Server, see the
|
|||
按照本演练进行操作,你需要一个部署并配置了
|
||||
[Metrics Server](https://github.com/kubernetes-sigs/metrics-server#readme) 的集群。
|
||||
Kubernetes Metrics Server 从集群中的 {{<glossary_tooltip term_id="kubelet" text="kubelets">}} 收集资源指标,
|
||||
并通过 [Kubernetes API](/zh/docs/concepts/overview/kubernetes-api/) 公开这些指标,
|
||||
使用 [APIService](/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) 添加代表指标读数的新资源。
|
||||
并通过 [Kubernetes API](/zh-cn/docs/concepts/overview/kubernetes-api/) 公开这些指标,
|
||||
使用 [APIService](/zh-cn/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) 添加代表指标读数的新资源。
|
||||
|
||||
要了解如何部署 Metrics Server,请参阅
|
||||
[metrics-server 文档](https://github.com/kubernetes-sigs/metrics-server#deployment)。
|
||||
|
@ -188,7 +188,7 @@ Deployment 然后更新 ReplicaSet —— 这是所有 Deployment 在 Kubernetes
|
|||
|
||||
由于每个 Pod 通过 `kubectl run` 请求 200 milli-cores,这意味着平均 CPU 使用率为 100 milli-cores。
|
||||
有关算法的更多详细信息,
|
||||
请参阅[算法详细信息](/zh/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details)。
|
||||
请参阅[算法详细信息](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale/#algorithm-details)。
|
||||
|
||||
|
||||
<!-- Create the HorizontalPodAutoscaler: -->
|
||||
|
|
|
@ -65,7 +65,7 @@ Pod 自动扩缩控制器会定期调整其目标(例如:Deployment)的所
|
|||
There is [walkthrough example](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/) of using
|
||||
horizontal pod autoscaling.
|
||||
-->
|
||||
使用水平 Pod 自动扩缩[演练示例](/zh/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)。
|
||||
使用水平 Pod 自动扩缩[演练示例](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)。
|
||||
|
||||
<!-- body -->
|
||||
|
||||
|
@ -84,7 +84,7 @@ Kubernetes implements horizontal pod autoscaling as a control loop that runs int
|
|||
(and the default interval is 15 seconds).
|
||||
-->
|
||||
Kubernetes 将水平 Pod 自动扩缩实现为一个间歇运行的控制回路(它不是一个连续的过程)。间隔由
|
||||
[`kube-controller-manager`](/zh/docs/reference/command-line-tools-reference/kube-controller-manager/)
|
||||
[`kube-controller-manager`](/zh-cn/docs/reference/command-line-tools-reference/kube-controller-manager/)
|
||||
的 `--horizontal-pod-autoscaler-sync-period` 参数设置(默认间隔为 15 秒)。
|
||||
|
||||
<!--
|
||||
|
@ -110,7 +110,7 @@ or the custom metrics API (for all other metrics).
|
|||
-->
|
||||
* 对于按 Pod 统计的资源指标(如 CPU),控制器从资源指标 API 中获取每一个
|
||||
HorizontalPodAutoscaler 指定的 Pod 的度量值,如果设置了目标使用率,
|
||||
控制器获取每个 Pod 中的容器[资源使用](/zh/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) 情况,
|
||||
控制器获取每个 Pod 中的容器[资源使用](/zh-cn/docs/concepts/configuration/manage-resources-containers/#requests-and-limits) 情况,
|
||||
并计算资源使用率。如果设置了 target 值,将直接使用原始数据(不再计算百分比)。
|
||||
接下来,控制器根据平均的资源使用率或原始值计算出扩缩的比例,进而计算出目标副本数。
|
||||
|
||||
|
@ -153,7 +153,7 @@ For more information about resource metrics, see
|
|||
HorizontalPodAutoscaler 的常见用途是将其配置为从{{< glossary_tooltip text="聚合 API" term_id="aggregation-layer" >}}
|
||||
(`metrics.k8s.io`、`custom.metrics.k8s.io` 或 `external.metrics.k8s.io`)获取指标。
|
||||
`metrics.k8s.io` API 通常由名为 Metrics Server 的插件提供,需要单独启动。有关资源指标的更多信息,
|
||||
请参阅 [Metrics Server](/zh/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/#metrics-server)。
|
||||
请参阅 [Metrics Server](/zh-cn/docs/tasks/debug/debug-cluster/resource-metrics-pipeline/#metrics-server)。
|
||||
|
||||
<!--
|
||||
[Support for metrics APIs](#support-for-metrics-apis) explains the stability guarantees and support status for these
|
||||
|
@ -170,7 +170,7 @@ For general information about subresources in the Kubernetes API, see
|
|||
HorizontalPodAutoscaler 控制器访问支持扩缩的相应工作负载资源(例如:Deployments 和 StatefulSet)。
|
||||
这些资源每个都有一个名为 `scale` 的子资源,该接口允许你动态设置副本的数量并检查它们的每个当前状态。
|
||||
有关 Kubernetes API 子资源的一般信息,
|
||||
请参阅 [Kubernetes API 概念](/zh/docs/reference/using-api/api-concepts/)。
|
||||
请参阅 [Kubernetes API 概念](/zh-cn/docs/reference/using-api/api-concepts/)。
|
||||
|
||||
<!--
|
||||
### Algorithm Details
|
||||
|
@ -218,7 +218,7 @@ are [`Ready`](/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions).
|
|||
那么将会把指定 Pod 度量值的平均值做为 `currentMetricValue`。
|
||||
|
||||
在检查容差并决定最终值之前,控制平面还会考虑是否缺少任何指标,
|
||||
以及有多少 Pod [`已就绪`](/zh/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)。
|
||||
以及有多少 Pod [`已就绪`](/zh-cn/docs/concepts/workloads/pods/pod-lifecycle/#pod-conditions)。
|
||||
|
||||
<!--
|
||||
All Pods with a deletion timestamp set (objects with a deletion timestamp are
|
||||
|
@ -357,7 +357,7 @@ More details about the API object can be found at
|
|||
[HorizontalPodAutoscaler Object](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v2-autoscaling).
|
||||
-->
|
||||
创建 HorizontalPodAutoscaler 对象时,需要确保所给的名称是一个合法的
|
||||
[DNS 子域名](/zh/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
|
||||
[DNS 子域名](/zh-cn/docs/concepts/overview/working-with-objects/names#dns-subdomain-names)。
|
||||
有关 API 对象的更多信息,请查阅
|
||||
[HorizontalPodAutoscaler 对象设计文档](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#horizontalpodautoscaler-v2-autoscaling)。
|
||||
|
||||
|
@ -592,7 +592,7 @@ APIs, cluster administrators must ensure that:
|
|||
|
||||
* For external metrics, this is the `external.metrics.k8s.io` API. It may be provided by the custom metrics adapters provided above.
|
||||
-->
|
||||
* 启用了 [API 聚合层](/zh/docs/tasks/extend-kubernetes/configure-aggregation-layer/)
|
||||
* 启用了 [API 聚合层](/zh-cn/docs/tasks/extend-kubernetes/configure-aggregation-layer/)
|
||||
|
||||
* 相应的 API 已注册:
|
||||
|
||||
|
@ -621,8 +621,8 @@ For examples of how to use them see [the walkthrough for using custom metrics](/
|
|||
and [the walkthrough for using external metrics](/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-metrics-not-related-to-kubernetes-objects).
|
||||
-->
|
||||
关于如何使用它们的示例,请参考
|
||||
[使用自定义指标的教程](/zh/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics)
|
||||
和[使用外部指标的教程](/zh/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-metrics-not-related-to-kubernetes-objects)。
|
||||
[使用自定义指标的教程](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-multiple-metrics-and-custom-metrics)
|
||||
和[使用外部指标的教程](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/#autoscaling-on-metrics-not-related-to-kubernetes-objects)。
|
||||
|
||||
<!--
|
||||
## Configurable scaling behavior
|
||||
|
@ -642,7 +642,7 @@ under the `behavior` field.
|
|||
(之前的 `autoscaling/v2beta2` API 版本将此功能作为 beta 功能提供)
|
||||
|
||||
如果你使用 `v2` HorizontalPodAutoscaler API,你可以使用 `behavior` 字段
|
||||
(请参阅 [API 参考](/zh/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/#HorizontalPodAutoscalerSpec))
|
||||
(请参阅 [API 参考](/zh-cn/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/#HorizontalPodAutoscalerSpec))
|
||||
来配置单独的放大和缩小行为。你可以通过在行为字段下设置 `scaleUp` 和/或 `scaleDown` 来指定这些行为。
|
||||
|
||||
<!--
|
||||
|
@ -944,7 +944,7 @@ update configuration as desired. You can avoid this degradation by choosing one
|
|||
methods based on how you are modifying your deployments:
|
||||
-->
|
||||
请记住,删除 `spec.replicas` 可能会导致 Pod 计数一次性降级,因为此键的默认值为 1
|
||||
(参考 [Deployment Replicas](/zh/docs/concepts/workloads/controllers/deployment#replicas))。
|
||||
(参考 [Deployment Replicas](/zh-cn/docs/concepts/workloads/controllers/deployment#replicas))。
|
||||
更新后,除 1 之外的所有 Pod 都将开始其终止程序。之后的任何部署应用程序都将正常运行,
|
||||
并根据需要遵守滚动更新配置。你可以根据修改部署的方式选择以下两种方法之一来避免这种降级:
|
||||
|
||||
|
@ -975,8 +975,8 @@ When using the [Server-Side Apply](/docs/reference/using-api/server-side-apply/)
|
|||
you can follow the [transferring ownership](/docs/reference/using-api/server-side-apply/#transferring-ownership)
|
||||
guidelines, which cover this exact use case.
|
||||
-->
|
||||
使用[服务器端 Apply](/zh/docs/reference/using-api/server-side-apply/) 机制,
|
||||
你可以遵循[交出所有权](/zh/docs/reference/using-api/server-side-apply/#transferring-ownership) 说明,
|
||||
使用[服务器端 Apply](/zh-cn/docs/reference/using-api/server-side-apply/) 机制,
|
||||
你可以遵循[交出所有权](/zh-cn/docs/reference/using-api/server-side-apply/#transferring-ownership) 说明,
|
||||
该指南涵盖了这个确切的用例。
|
||||
|
||||
{{% /tab %}}
|
||||
|
@ -1001,7 +1001,7 @@ For more information on HorizontalPodAutoscaler:
|
|||
[boilerplate](https://github.com/kubernetes-sigs/custom-metrics-apiserver) to get started.
|
||||
* Read the [API reference](/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/) for HorizontalPodAutoscaler.
|
||||
-->
|
||||
* 阅读水平 Pod 自动扩缩的[演练示例](/zh/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)。
|
||||
* 阅读水平 Pod 自动扩缩的[演练示例](/zh-cn/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/)。
|
||||
* 阅读 [`kubectl autoscale`](/docs/reference/generated/kubectl/kubectl-commands/#autoscale) 的文档。
|
||||
* 如果你想编写自己的自定义指标适配器,
|
||||
请查看 [boilerplate](https://github.com/kubernetes-sigs/custom-metrics-apiserver) 以开始使用。
|
||||
|
|
|
@ -25,7 +25,7 @@ This application is a replicated MySQL database. The example topology has a
|
|||
single primary server and multiple replicas, using asynchronous row-based
|
||||
replication.
|
||||
-->
|
||||
本页展示如何使用 [StatefulSet](/zh/docs/concepts/workloads/controllers/statefulset/)
|
||||
本页展示如何使用 [StatefulSet](/zh-cn/docs/concepts/workloads/controllers/statefulset/)
|
||||
控制器运行一个有状态的应用程序。此例是多副本的 MySQL 数据库。
|
||||
示例应用的拓扑结构有一个主服务器和多个副本,使用异步的基于行(Row-Based)
|
||||
的数据复制。
|
||||
|
@ -58,11 +58,11 @@ on general patterns for running stateful applications in Kubernetes.
|
|||
* You are using the default namespace or another namespace that does not contain any conflicting objects.
|
||||
-->
|
||||
* 本教程假定你熟悉
|
||||
[PersistentVolumes](/zh/docs/concepts/storage/persistent-volumes/)
|
||||
与 [StatefulSet](/zh/docs/concepts/workloads/controllers/statefulset/),
|
||||
以及其他核心概念,例如 [Pod](/zh/docs/concepts/workloads/pods/)、
|
||||
[服务](/zh/docs/concepts/services-networking/service/) 与
|
||||
[ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap/).
|
||||
[PersistentVolumes](/zh-cn/docs/concepts/storage/persistent-volumes/)
|
||||
与 [StatefulSet](/zh-cn/docs/concepts/workloads/controllers/statefulset/),
|
||||
以及其他核心概念,例如 [Pod](/zh-cn/docs/concepts/workloads/pods/)、
|
||||
[服务](/zh-cn/docs/concepts/services-networking/service/) 与
|
||||
[ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/).
|
||||
* 熟悉 MySQL 会有所帮助,但是本教程旨在介绍对其他系统应该有用的常规模式。
|
||||
* 你正在使用默认命名空间或不包含任何冲突对象的另一个命名空间。
|
||||
|
||||
|
@ -256,7 +256,7 @@ in the order defined.
|
|||
### 生成配置
|
||||
|
||||
在启动 Pod 规约中的任何容器之前,Pod 首先按顺序运行所有的
|
||||
[Init 容器](/zh/docs/concepts/workloads/pods/init-containers/)。
|
||||
[Init 容器](/zh-cn/docs/concepts/workloads/pods/init-containers/)。
|
||||
|
||||
<!--
|
||||
The first Init Container, named `init-mysql`, generates special MySQL config
|
||||
|
@ -296,7 +296,7 @@ replicating.
|
|||
因此脚本仅将序数 `0` 指定为主节点,而将其他所有节点指定为副本节点。
|
||||
|
||||
与 StatefulSet 控制器的
|
||||
[部署顺序保证](/zh/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees)
|
||||
[部署顺序保证](/zh-cn/docs/concepts/workloads/controllers/statefulset/#deployment-and-scaling-guarantees)
|
||||
相结合,
|
||||
可以确保 MySQL 主服务器在创建副本服务器之前已准备就绪,以便它们可以开始复制。
|
||||
|
||||
|
@ -502,7 +502,7 @@ to make sure the server is up and able to execute queries.
|
|||
### 破坏就绪态探测
|
||||
|
||||
`mysql` 容器的
|
||||
[就绪态探测](/zh/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)
|
||||
[就绪态探测](/zh-cn/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/#define-readiness-probes)
|
||||
运行命令 `mysql -h 127.0.0.1 -e 'SELECT 1'`,以确保服务器已启动并能够执行查询。
|
||||
|
||||
<!--
|
||||
|
@ -855,9 +855,9 @@ kubectl delete pvc data-mysql-4
|
|||
* Look in the [Helm Charts repository](https://artifacthub.io/)
|
||||
for other stateful application examples.
|
||||
-->
|
||||
* 进一步了解[为 StatefulSet 扩缩容](/zh/docs/tasks/run-application/scale-stateful-set/).
|
||||
* 进一步了解[调试 StatefulSet](/zh/docs/tasks/debug/debug-application/debug-statefulset/).
|
||||
* 进一步了解[删除 StatefulSet](/zh/docs/tasks/run-application/delete-stateful-set/).
|
||||
* 进一步了解[强制删除 StatefulSet Pods](/zh/docs/tasks/run-application/force-delete-stateful-set-pod/).
|
||||
* 进一步了解[为 StatefulSet 扩缩容](/zh-cn/docs/tasks/run-application/scale-stateful-set/).
|
||||
* 进一步了解[调试 StatefulSet](/zh-cn/docs/tasks/debug/debug-application/debug-statefulset/).
|
||||
* 进一步了解[删除 StatefulSet](/zh-cn/docs/tasks/run-application/delete-stateful-set/).
|
||||
* 进一步了解[强制删除 StatefulSet Pods](/zh-cn/docs/tasks/run-application/force-delete-stateful-set-pod/).
|
||||
* 在 [Helm Charts 仓库](https://artifacthub.io/)中查找其他有状态的应用程序示例。
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ Note: The password is defined in the config yaml, and this is insecure. See
|
|||
for a secure solution.
|
||||
-->
|
||||
注意:在配置的 YAML 文件中定义密码的做法是不安全的。具体安全解决方案请参考
|
||||
[Kubernetes Secrets](/zh/docs/concepts/configuration/secret/).
|
||||
[Kubernetes Secrets](/zh-cn/docs/concepts/configuration/secret/).
|
||||
|
||||
{{< codenew file="application/mysql/mysql-deployment.yaml" >}}
|
||||
{{< codenew file="application/mysql/mysql-pv.yaml" >}}
|
||||
|
@ -231,7 +231,7 @@ Deployment 中镜像或其他部分同往常一样可以通过 `kubectl apply`
|
|||
-->
|
||||
* 不要对应用进行规模扩缩。这里的设置仅适用于单实例应用。下层的 PersistentVolume
|
||||
仅只能挂载到一个 Pod 上。对于集群级有状态应用,请参考
|
||||
[StatefulSet 文档](/zh/docs/concepts/workloads/controllers/statefulset/).
|
||||
[StatefulSet 文档](/zh-cn/docs/concepts/workloads/controllers/statefulset/).
|
||||
* 在 Deployment 的 YAML 文件中使用 `strategy:` `type: Recreate`。
|
||||
该选项指示 Kubernetes _不_ 使用滚动升级。滚动升级无法工作,因为这里一次不能
|
||||
运行多个 Pod。在使用更新的配置文件创建新的 Pod 前,`Recreate` 策略将
|
||||
|
@ -276,11 +276,11 @@ PersistentVolume 将被自动删除。
|
|||
|
||||
* [Volumes](/docs/concepts/storage/volumes/) and [Persistent Volumes](/docs/concepts/storage/persistent-volumes/)
|
||||
-->
|
||||
* 欲进一步了解 Deployment 对象,请参考 [Deployment 对象](/zh/docs/concepts/workloads/controllers/deployment/)
|
||||
* 进一步了解[部署应用](/zh/docs/tasks/run-application/run-stateless-application-deployment/)
|
||||
* 欲进一步了解 Deployment 对象,请参考 [Deployment 对象](/zh-cn/docs/concepts/workloads/controllers/deployment/)
|
||||
* 进一步了解[部署应用](/zh-cn/docs/tasks/run-application/run-stateless-application-deployment/)
|
||||
|
||||
* 参阅 [kubectl run 文档](/docs/reference/generated/kubectl/kubectl-commands/#run)
|
||||
|
||||
* 参阅[卷](/zh/docs/concepts/storage/volumes/)和[持久卷](/zh/docs/concepts/storage/persistent-volumes/)
|
||||
* 参阅[卷](/zh-cn/docs/concepts/storage/volumes/)和[持久卷](/zh-cn/docs/concepts/storage/persistent-volumes/)
|
||||
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ added to Kubernetes, replicated applications were configured using a
|
|||
|
||||
创建一个多副本应用首选方法是使用 Deployment,Deployment 内部使用 ReplicaSet。
|
||||
在 Deployment 和 ReplicaSet 被引入到 Kubernetes 之前,多副本应用通过
|
||||
[ReplicationController](/zh/docs/concepts/workloads/controllers/replicationcontroller/)
|
||||
[ReplicationController](/zh-cn/docs/concepts/workloads/controllers/replicationcontroller/)
|
||||
来配置。
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
@ -239,5 +239,5 @@ added to Kubernetes, replicated applications were configured using a
|
|||
<!--
|
||||
* Learn more about [Deployment objects](/docs/concepts/workloads/controllers/deployment/).
|
||||
-->
|
||||
* 进一步了解 [Deployment 对象](/zh/docs/concepts/workloads/controllers/deployment/)。
|
||||
* 进一步了解 [Deployment 对象](/zh-cn/docs/concepts/workloads/controllers/deployment/)。
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ This task shows how to scale a StatefulSet. Scaling a StatefulSet refers to incr
|
|||
* StatefulSets 仅适用于 Kubernetes 1.5 及以上版本。
|
||||
* 不是所有 Stateful 应用都能很好地执行扩缩操作。
|
||||
如果你不是很确定是否要扩缩你的 StatefulSet,可先参阅
|
||||
[StatefulSet 概念](/zh/docs/concepts/workloads/controllers/statefulset/)
|
||||
或者 [StatefulSet 教程](/zh/docs/tutorials/stateful-application/basic-stateful-set/)。
|
||||
[StatefulSet 概念](/zh-cn/docs/concepts/workloads/controllers/statefulset/)
|
||||
或者 [StatefulSet 教程](/zh-cn/docs/tutorials/stateful-application/basic-stateful-set/)。
|
||||
|
||||
* 仅当你确定你的有状态应用的集群是完全健康的,才可执行扩缩操作.
|
||||
|
||||
|
@ -75,7 +75,7 @@ update `.spec.replicas` of the StatefulSet manifests, and then do a `kubectl app
|
|||
-->
|
||||
### 对 StatefulSet 执行就地更新
|
||||
|
||||
另外, 你可以[就地更新](/zh/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources) StatefulSet。
|
||||
另外, 你可以[就地更新](/zh-cn/docs/concepts/cluster-administration/manage-deployment/#in-place-updates-of-resources) StatefulSet。
|
||||
|
||||
如果你的 StatefulSet 最初通过 `kubectl apply` 或 `kubectl create --save-config` 创建,
|
||||
你可以更新 StatefulSet 清单中的 `.spec.replicas`, 然后执行命令 `kubectl apply`:
|
||||
|
@ -163,5 +163,5 @@ Stateful 应用的集群是完全健康时才执行扩缩操作。
|
|||
<!--
|
||||
* Learn more about [deleting a StatefulSet](/docs/tasks/run-application/delete-stateful-set/).
|
||||
-->
|
||||
* 进一步了解[删除 StatefulSet](/zh/docs/tasks/run-application/delete-stateful-set/)
|
||||
* 进一步了解[删除 StatefulSet](/zh-cn/docs/tasks/run-application/delete-stateful-set/)
|
||||
|
||||
|
|
|
@ -32,12 +32,12 @@ Use [Helm](https://helm.sh/) to install Service Catalog on your Kubernetes clust
|
|||
* Follow the [Helm install instructions](https://github.com/kubernetes/helm/blob/master/docs/install.md).
|
||||
* If you already have an appropriate version of Helm installed, execute `helm init` to install Tiller, the server-side component of Helm.
|
||||
-->
|
||||
* 理解[服务目录](/zh/docs/concepts/extend-kubernetes/service-catalog/) 的关键概念。
|
||||
* 理解[服务目录](/zh-cn/docs/concepts/extend-kubernetes/service-catalog/) 的关键概念。
|
||||
* Service Catalog 需要 Kubernetes 集群版本在 1.7 或更高版本。
|
||||
* 你必须启用 Kubernetes 集群的 DNS 功能。
|
||||
* 如果使用基于云的 Kubernetes 集群或 {{< glossary_tooltip text="Minikube" term_id="minikube" >}},则可能已经启用了集群 DNS。
|
||||
* 如果你正在使用 `hack/local-up-cluster.sh`,请确保设置了 `KUBE_ENABLE_CLUSTER_DNS` 环境变量,然后运行安装脚本。
|
||||
* [安装和设置 v1.7 或更高版本的 kubectl](/zh/docs/tasks/tools/),确保将其配置为连接到 Kubernetes 集群。
|
||||
* [安装和设置 v1.7 或更高版本的 kubectl](/zh-cn/docs/tasks/tools/),确保将其配置为连接到 Kubernetes 集群。
|
||||
* 安装 v2.7.0 或更高版本的 [Helm](https://helm.sh/)。
|
||||
* 遵照 [Helm 安装说明](https://helm.sh/docs/intro/install/)。
|
||||
* 如果已经安装了适当版本的 Helm,请执行 `helm init` 来安装 Helm 的服务器端组件 Tiller。
|
||||
|
|
|
@ -36,12 +36,12 @@ Service Catalog can work with any kind of managed service, not only Google Cloud
|
|||
|
||||
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=<user-name>
|
||||
-->
|
||||
* 了解[服务目录](/zh/docs/concepts/extend-kubernetes/service-catalog/)
|
||||
* 了解[服务目录](/zh-cn/docs/concepts/extend-kubernetes/service-catalog/)
|
||||
的主要概念。
|
||||
* 安装 [Go 1.6+](https://golang.org/dl/) 以及设置 `GOPATH`。
|
||||
* 安装生成 SSL 工件所需的 [cfssl](https://github.com/cloudflare/cfssl) 工具。
|
||||
* 服务目录需要 Kubernetes 1.7+ 版本。
|
||||
* [安装和设置 kubectl](/zh/docs/tasks/tools/),
|
||||
* [安装和设置 kubectl](/zh-cn/docs/tasks/tools/),
|
||||
以便将其配置为连接到 Kubernetes v1.7+ 集群。
|
||||
* 要安装服务目录,kubectl 用户必须绑定到 *cluster-admin* 角色。
|
||||
为了确保这是正确的,请运行以下命令:
|
||||
|
|
|
@ -48,7 +48,7 @@ new certificate is available, it will be used for authenticating connections to
|
|||
the Kubernetes API.
|
||||
-->
|
||||
Kubernetes 包含特性
|
||||
[kubelet 证书轮换](/zh/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/),
|
||||
[kubelet 证书轮换](/zh-cn/docs/reference/access-authn-authz/kubelet-tls-bootstrapping/),
|
||||
在当前证书即将过期时,
|
||||
将自动生成新的秘钥,并从 Kubernetes API 申请新的证书。 一旦新的证书可用,它将被用于与
|
||||
Kubernetes API 间的连接认证。
|
||||
|
|
|
@ -95,7 +95,7 @@ have access to read.
|
|||
内部 Kubernetes 端点的一个示例是默认命名空间中名为 `kubernetes` 的服务。
|
||||
|
||||
如果你想为你的工作负载使用自定义证书颁发机构,你应该单独生成该 CA,
|
||||
并使用你的 Pod 有读权限的 [ConfigMap](/zh/docs/tasks/configure-pod-container/configure-pod-configmap)
|
||||
并使用你的 Pod 有读权限的 [ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap)
|
||||
分发该 CA 证书。
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -217,7 +217,7 @@ it by running:
|
|||
“密钥加密(key encipherment)” 和 “服务器身份验证(server auth)” 密钥用途,
|
||||
由 `example.com/serving` 示例签名程序签名的证书。
|
||||
你也可以要求使用特定的 `signerName`。更多信息可参阅
|
||||
[支持的签署者名称](/zh/docs/reference/access-authn-authz/certificate-signing-requests/#signers)。
|
||||
[支持的签署者名称](/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests/#signers)。
|
||||
|
||||
在 API server 中可以看到这些 CSR 处于 Pending 状态。执行下面的命令你将可以看到:
|
||||
|
||||
|
@ -254,7 +254,7 @@ manually using `kubectl`; for example:
|
|||
-->
|
||||
## 批准证书签名请求(CSR) {#get-the-certificate-signing-request-approved}
|
||||
|
||||
[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)
|
||||
[证书签名请求](/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests/)
|
||||
的批准或者是通过自动批准过程完成的,或由集群管理员一次性完成。
|
||||
如果你被授权批准证书请求,你可以使用 `kubectl` 来手动完成此操作;例如:
|
||||
|
||||
|
@ -530,7 +530,7 @@ reference page.
|
|||
当且仅当满足这两个要求时,审批者应该批准 CSR,否则拒绝 CSR。
|
||||
|
||||
有关证书批准和访问控制的更多信息,
|
||||
请阅读[证书签名请求](/zh/docs/reference/access-authn-authz/certificate-signing-requests/)参考页。
|
||||
请阅读[证书签名请求](/zh-cn/docs/reference/access-authn-authz/certificate-signing-requests/)参考页。
|
||||
|
||||
<!--
|
||||
## Configuring your cluster to provide signing
|
||||
|
|
|
@ -24,8 +24,8 @@ This page shows how to manually rotate the certificate authority (CA) certificat
|
|||
- For more information about best practices for CA certificates, see [Single root CA](/docs/setup/best-practices/certificates/#single-root-ca).
|
||||
-->
|
||||
- 要了解 Kubernetes 中用户认证的更多信息,参阅
|
||||
[认证](/zh/docs/reference/access-authn-authz/authentication);
|
||||
- 要了解与 CA 证书最佳实践有关的更多信息,参阅[单根 CA](/zh/docs/setup/best-practices/certificates/#single-root-ca)。
|
||||
[认证](/zh-cn/docs/reference/access-authn-authz/authentication);
|
||||
- 要了解与 CA 证书最佳实践有关的更多信息,参阅[单根 CA](/zh-cn/docs/setup/best-practices/certificates/#single-root-ca)。
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
|
@ -152,7 +152,7 @@ Configurations with a single API server will experience unavailability while the
|
|||
中的内容,更新用户账号的证书。
|
||||
|
||||
有关为独立用户账号创建证书的更多信息,可参阅
|
||||
[为用户帐号配置证书](/zh/docs/setup/best-practices/certificates/#configure-certificates-for-user-accounts)。
|
||||
[为用户帐号配置证书](/zh-cn/docs/setup/best-practices/certificates/#configure-certificates-for-user-accounts)。
|
||||
|
||||
另外,还要更新 kubeconfig 文件中的 `certificate-authority-data`
|
||||
节,使之包含 Base64 编码的老的和新的证书机构数据。
|
||||
|
@ -171,7 +171,7 @@ Configurations with a single API server will experience unavailability while the
|
|||
-->
|
||||
8. 遵循下列步骤执行滚动更新
|
||||
|
||||
1. 重新启动所有其他 *[被聚合的 API 服务器](/zh/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)*
|
||||
1. 重新启动所有其他 *[被聚合的 API 服务器](/zh-cn/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)*
|
||||
或者 *Webhook 处理程序*,使之信任新的 CA 证书。
|
||||
|
||||
2. 在所有节点上更新 kubelet 配置中的 `clientCAFile` 所指文件以及 kubelet.conf 中的
|
||||
|
@ -210,8 +210,8 @@ Configurations with a single API server will experience unavailability while the
|
|||
-->
|
||||
{{< note >}}
|
||||
要使用 `openssl` 命令行为集群生成新的证书和私钥,可参阅
|
||||
[证书(`openssl`)](/zh/docs/tasks/administer-cluster/certificates/#openssl)。
|
||||
你也可以使用[`cfssl`](/zh/docs/tasks/administer-cluster/certificates/#cfssl).
|
||||
[证书(`openssl`)](/zh-cn/docs/tasks/administer-cluster/certificates/#openssl)。
|
||||
你也可以使用[`cfssl`](/zh-cn/docs/tasks/administer-cluster/certificates/#cfssl).
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
|
@ -240,7 +240,7 @@ Configurations with a single API server will experience unavailability while the
|
|||
-->
|
||||
{{< note >}}
|
||||
要限制应用可能受到的并发干扰数量,可以参阅
|
||||
[配置 Pod 干扰预算](/zh/docs/tasks/run-application/configure-pdb/).
|
||||
[配置 Pod 干扰预算](/zh-cn/docs/tasks/run-application/configure-pdb/).
|
||||
{{< /note >}}
|
||||
<!--
|
||||
1. If your cluster is using bootstrap tokens to join nodes, update the ConfigMap `cluster-info` in the `kube-public` namespace with new CA.
|
||||
|
@ -268,7 +268,7 @@ Configurations with a single API server will experience unavailability while the
|
|||
|
||||
1. 验证控制面组件的日志,以及 `kubelet` 和 `kube-proxy` 的日志,确保其中没有
|
||||
抛出 TLS 错误,参阅
|
||||
[查看日志](/zh/docs/tasks/debug/debug-cluster/#looking-at-logs).
|
||||
[查看日志](/zh-cn/docs/tasks/debug/debug-cluster/#looking-at-logs).
|
||||
|
||||
2. 验证被聚合的 API 服务器的日志,以及所有使用集群内配置的 Pod 的日志。
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ Kubernetes 命令行工具,[kubectl](/docs/reference/kubectl/kubectl/),使
|
|||
你可以使用 kubectl 来部署应用、监测和管理集群资源以及查看日志。
|
||||
|
||||
有关更多信息,包括 kubectl 操作的完整列表,请参见[`kubectl`
|
||||
参考文件](/zh/docs/reference/kubectl/)。
|
||||
参考文件](/zh-cn/docs/reference/kubectl/)。
|
||||
|
||||
<!--
|
||||
kubectl is installable on a variety of Linux platforms, macOS and Windows.
|
||||
|
@ -40,9 +40,9 @@ Find your preferred operating system below.
|
|||
kubectl 可安装在各种 Linux 平台、 macOS 和 Windows 上。
|
||||
在下面找到你喜欢的操作系统。
|
||||
|
||||
- [在 Linux 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-linux)
|
||||
- [在 macOS 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-macos)
|
||||
- [在 Windows 上安装 kubectl](/zh/docs/tasks/tools/install-kubectl-windows)
|
||||
- [在 Linux 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-linux)
|
||||
- [在 macOS 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-macos)
|
||||
- [在 Windows 上安装 kubectl](/zh-cn/docs/tasks/tools/install-kubectl-windows)
|
||||
|
||||
<!--
|
||||
## kind
|
||||
|
@ -104,7 +104,7 @@ Once you have `minikube` working, you can use it to
|
|||
</a>
|
||||
|
||||
当你拥有了可工作的 `minikube` 时,就可以用它来
|
||||
[运行示例应用](/zh/docs/tutorials/hello-minikube/)了。
|
||||
[运行示例应用](/zh-cn/docs/tutorials/hello-minikube/)了。
|
||||
|
||||
## kubeadm
|
||||
|
||||
|
@ -120,13 +120,13 @@ It performs the actions necessary to get a minimum viable, secure cluster up and
|
|||
[Installing kubeadm](/docs/setup/production-environment/tools/kubeadm/install-kubeadm/) shows you how to install kubeadm.
|
||||
Once installed, you can use it to [create a cluster](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/).
|
||||
-->
|
||||
[安装 kubeadm](/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)
|
||||
[安装 kubeadm](/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)
|
||||
展示了如何安装 kubeadm 的过程。
|
||||
一旦安装了 kubeadm,你就可以使用它来
|
||||
[创建一个集群](/zh/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)。
|
||||
[创建一个集群](/zh-cn/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)。
|
||||
|
||||
<!-- a class="btn btn-primary" href="/docs/setup/production-environment/tools/kubeadm/install-kubeadm/" role="button" aria-label="View kubeadm Install Guide">View kubeadm Install Guide</a-->
|
||||
|
||||
<a class="btn btn-primary" href="/zh/docs/setup/production-environment/tools/kubeadm/install-kubeadm/"
|
||||
<a class="btn btn-primary" href="/zh-cn/docs/setup/production-environment/tools/kubeadm/install-kubeadm/"
|
||||
role="button" aria-label="查看 kubeadm 安装指南">查看 kubeadm 安装指南</a>
|
||||
|
||||
|
|
|
@ -21,4 +21,4 @@ For more info, visit [migrate to non deprecated apis](/docs/reference/using-api/
|
|||
-->
|
||||
一个 Kubernetes 命令行工具 `kubectl` 的插件,允许你将清单在不同 API 版本间转换。
|
||||
这对于将清单迁移到新的 Kubernetes 发行版上未被废弃的 API 版本时尤其有帮助。
|
||||
更多信息请访问 [迁移到非弃用 API](/zh/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)
|
||||
更多信息请访问 [迁移到非弃用 API](/zh-cn/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)
|
||||
|
|
|
@ -20,8 +20,8 @@ headless: true
|
|||
* Read the [kubectl reference docs](/docs/reference/kubectl/kubectl/)
|
||||
-->
|
||||
* [安装 Minikube](https://minikube.sigs.k8s.io/docs/start/)
|
||||
* 有关创建集群的更多信息,请参阅[入门指南](/zh/docs/setup/).
|
||||
* [学习如何启动并对外公开你的应用程序。](/zh/docs/tasks/access-application-cluster/service-access-application-cluster/)
|
||||
* 有关创建集群的更多信息,请参阅[入门指南](/zh-cn/docs/setup/).
|
||||
* [学习如何启动并对外公开你的应用程序。](/zh-cn/docs/tasks/access-application-cluster/service-access-application-cluster/)
|
||||
* 如果你需要访问其他人创建的集群,请参阅
|
||||
[共享集群接入文档](/zh/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
|
||||
* 阅读 [kubectl 参考文档](/zh/docs/reference/kubectl/kubectl/)
|
||||
[共享集群接入文档](/zh-cn/docs/tasks/access-application-cluster/configure-access-multiple-clusters/).
|
||||
* 阅读 [kubectl 参考文档](/zh-cn/docs/reference/kubectl/kubectl/)
|
||||
|
|
|
@ -155,7 +155,7 @@ You now have to ensure that the kubectl completion script gets sourced in all yo
|
|||
- If you installed kubectl with Homebrew (as explained [here](/docs/tasks/tools/install-kubectl-macos/#install-with-homebrew-on-macos)), then the kubectl completion script should already be in `/usr/local/etc/bash_completion.d/kubectl`. In that case, you don't need to do anything.
|
||||
-->
|
||||
- 如果你是用 Homebrew 安装的 kubectl(如
|
||||
[此页面](/zh/docs/tasks/install-with-homebrew-on-macos/#install-with-homebrew-on-macos)
|
||||
[此页面](/zh-cn/docs/tasks/install-with-homebrew-on-macos/#install-with-homebrew-on-macos)
|
||||
所描述),则kubectl 补全脚本应该已经安装到目录 `/usr/local/etc/bash_completion.d/kubectl`
|
||||
中了。这种情况下,你什么都不需要做。
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ By default, kubectl configuration is located at `~/.kube/config`.
|
|||
Check that kubectl is properly configured by getting the cluster state:
|
||||
-->
|
||||
为了让 kubectl 能发现并访问 Kubernetes 集群,你需要一个
|
||||
[kubeconfig 文件](/zh/docs/concepts/configuration/organize-cluster-access-kubeconfig/),
|
||||
[kubeconfig 文件](/zh-cn/docs/concepts/configuration/organize-cluster-access-kubeconfig/),
|
||||
该文件在
|
||||
[kube-up.sh](https://github.com/kubernetes/kubernetes/blob/master/cluster/kube-up.sh)
|
||||
创建集群时,或成功部署一个 Miniube 集群时,均会自动生成。
|
||||
|
|
Loading…
Reference in New Issue