Merge pull request #38871 from windsonsea/upgradey

[zh] sync cluster-upgrade.md
pull/39050/merge
Kubernetes Prow Robot 2023-01-22 01:58:02 -08:00 committed by GitHub
commit 15d92d12d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 34 additions and 33 deletions

View File

@ -8,7 +8,7 @@ content_type: task
-->
<!-- overview -->
<!--
<!--
This page provides an overview of the steps you should follow to upgrade a
Kubernetes cluster.
@ -23,7 +23,7 @@ At a high level, the steps you perform are:
从高层规划的角度看,要执行的步骤是:
<!--
<!--
- Upgrade the {{< glossary_tooltip text="control plane" term_id="control-plane" >}}
- Upgrade the nodes in your cluster
- Upgrade clients such as {{< glossary_tooltip text="kubectl" term_id="kubectl" >}}
@ -37,24 +37,26 @@ At a high level, the steps you perform are:
## {{% heading "prerequisites" %}}
<!--
<!--
You must have an existing cluster. This page is about upgrading from Kubernetes
{{< skew currentVersionAddMinor -1 >}} to Kubernetes {{< skew currentVersion >}}. If your cluster
is not currently running Kubernetes {{< skew currentVersionAddMinor -1 >}} then please check
the documentation for the version of Kubernetes that you plan to upgrade to.
-->
你必须有一个集群。
本页内容涉及从 Kubernetes {{< skew currentVersionAddMinor -1 >}}
本页内容涉及从 Kubernetes {{< skew currentVersionAddMinor -1 >}}
升级到 Kubernetes {{< skew currentVersion >}}。
如果你的集群未运行 Kubernetes {{< skew currentVersionAddMinor -1 >}}
那请参考目标 Kubernetes 版本的文档。
<!-- ## Upgrade approaches -->
<!--
## Upgrade approaches
-->
## 升级方法 {#upgrade-approaches}
### kubeadm {#upgrade-kubeadm}
<!--
<!--
If your cluster was deployed using the `kubeadm` tool, refer to
[Upgrading kubeadm clusters](/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)
for detailed information on how to upgrade the cluster.
@ -63,58 +65,56 @@ Once you have upgraded the cluster, remember to
[install the latest version of `kubectl`](/docs/tasks/tools/).
-->
如果你的集群是使用 `kubeadm` 安装工具部署而来,
那么升级集群的详细信息,请参阅
[升级 kubeadm 集群](/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)。
那么升级集群的详细信息,请参阅[升级 kubeadm 集群](/zh-cn/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade/)。
升级集群之后,要记得
[安装最新版本的 `kubectl`](/zh-cn/docs/tasks/tools/).
升级集群之后,要记得[安装最新版本的 `kubectl`](/zh-cn/docs/tasks/tools/)。
<!-- ### Manual deployments -->
<!--
### Manual deployments
-->
### 手动部署 {#manual-deployments}
<!--
{{< caution >}}
<!--
These steps do not account for third-party extensions such as network and storage
plugins.
You should manually update the control plane following this sequence:
-->
{{< caution >}}
这些步骤不考虑第三方扩展,例如网络和存储插件。
这些步骤不考虑网络和存储插件等第三方扩展。
{{< /caution >}}
你应该跟随下面操作顺序,手动更新控制平面:
<!--
You should manually update the control plane following this sequence:
<!--
- etcd (all instances)
- kube-apiserver (all control plane hosts)
- kube-controller-manager
- kube-scheduler
- cloud controller manager, if you use one
-->
你应该按照下面的操作顺序,手动更新控制平面:
- etcd (所有实例)
- kube-apiserver (所有控制平面的宿主机)
- kube-controller-manager
- kube-scheduler
- cloud controller manager (在你用到时)
<!--
<!--
At this point you should
[install the latest version of `kubectl`](/docs/tasks/tools/).
For each node in your cluster, [drain](/docs/tasks/administer-cluster/safely-drain-node/)
that node and then either replace it with a new node that uses the {{< skew currentVersion >}}
kubelet, or upgrade the {{< skew currentVersion >}}
kubelet on that node and bring the node back into service.
kubelet, or upgrade the kubelet on that node and bring the node back into service.
-->
现在,你应该
[安装最新版本的 `kubectl`](/zh-cn/docs/tasks/tools/).
现在,你应该[安装最新版本的 `kubectl`](/zh-cn/docs/tasks/tools/)。
对于集群中的每个节点,
首先需要[腾空](/zh-cn/docs/tasks/administer-cluster/safely-drain-node/)
节点,然后使用一个运行了 kubelet {{< skew currentVersion >}} 版本的新节点替换它;
首先需要[腾空](/zh-cn/docs/tasks/administer-cluster/safely-drain-node/)节点,
然后使用一个运行了 kubelet {{< skew currentVersion >}} 版本的新节点替换它;
或者升级此节点的 kubelet并使节点恢复服务。
<!--
<!--
### Other deployments {#upgrade-other}
Refer to the documentation for your cluster deployment tool to learn the recommended set
@ -132,7 +132,7 @@ up steps for maintenance.
### 切换集群的存储 API 版本 {#switch-your-clusters-storage-api-version}
<!--
<!--
The objects that are serialized into etcd for a cluster's internal
representation of the Kubernetes resources active in the cluster are
written using a particular version of the API.
@ -152,7 +152,7 @@ write it back also using the latest supported API.
对于每个受影响的对象,请使用最新支持的 API 读取它,然后使用所支持的最新 API 将其写回。
<!--
<!--
### Update manifests
Upgrading to a new Kubernetes version can provide new APIs.
@ -171,7 +171,7 @@ For example:
kubectl convert -f pod.yaml --output-version v1
```
<!--
<!--
The `kubectl` tool replaces the contents of `pod.yaml` with a manifest that sets `kind` to
Pod (unchanged), but with a revised `apiVersion`.
-->
@ -187,13 +187,14 @@ release with a newer device plugin API version, device plugins must be upgraded
both version before the node is upgraded in order to guarantee that device allocations
continue to complete successfully during the upgrade.
Refer to [API compatiblity](docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md/#api-compatibility) and [Kubelet Device Manager API Versions](docs/reference/node/device-plugin-api-versions.md) for more details.
Refer to [API compatibility](/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#api-compatibility) and [Kubelet Device Manager API Versions](/docs/reference/node/device-plugin-api-versions/) for more details.
-->
### 设备插件 {#device-plugins}
如果你的集群正在运行设备插件Device Plugins并且节点需要升级到具有更新的设备插件Device Plugins
如果你的集群正在运行设备插件Device Plugin并且节点需要升级到具有更新的设备插件Device Plugin
API 版本的 Kubernetes 版本,则必须在升级节点之前升级设备插件以同时支持这两个插件 API 版本,
以确保升级过程中设备分配能够继续成功完成。
有关详细信息,请参阅 [API 兼容性](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md/#api-compatibility)和
[kubelet 设备管理器 API 版本](/zh-cn/docs/reference/node/device-plugin-api-versions.md)。
有关详细信息,请参阅
[API 兼容性](/zh-cn/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#api-compatibility)和
[kubelet 设备管理器 API 版本](/zh-cn/docs/reference/node/device-plugin-api-versions/)。