mirror of https://github.com/istio/istio.io.git
zh:sync files in /setup/upgrade/ (#11928)
This commit is contained in:
parent
94229eaaa5
commit
d2726ef21f
|
@ -1,176 +0,0 @@
|
|||
---
|
||||
title: 使用 Helm 升级
|
||||
description: 升级 Istio 控制平面,可以选择使用 Helm 升级 CNI 插件。
|
||||
weight: 30
|
||||
aliases:
|
||||
- /zh/docs/setup/kubernetes/upgrade/steps/
|
||||
- /zh/docs/setup/upgrade/steps
|
||||
keywords: [kubernetes,upgrading]
|
||||
---
|
||||
|
||||
请参阅本指南,以升级使用 Helm 安装的 Istio 控制平面和 sidecar 代理。升级过程可能会安装新的二级制文件,并可能修改配置和 API schema。升级过程可能导致服务停机。为了减少停机时间,请确保 Istio 控制平面组件和应用程序是多副本高可用的。
|
||||
|
||||
{{< warning >}}
|
||||
在将 Istio 版本升级到 {{< istio_version >}} 之前,请务必查看[升级说明]。
|
||||
{{< /warning >}}
|
||||
|
||||
{{< tip >}}
|
||||
Istio **不支持** 跨版本升级。仅支持从 {{< istio_previous_version >}} 版本升级到 {{< istio_version >}} 版本。如果您使用的是旧版本,请先升级到 {{< istio_previous_version >}} 版本。
|
||||
{{< /tip >}}
|
||||
|
||||
## 升级步骤{#upgrade-steps}
|
||||
|
||||
[下载新版本 Istio](/zh/docs/setup/getting-started/#download),并切换目录到新版本的目录下。
|
||||
|
||||
### Istio CNI 升级{#Istio-CNI-upgrade}
|
||||
|
||||
如果您已经安装或计划安装 [Istio CNI](/zh/docs/setup/additional-setup/cni/),请选择以下 **互斥** 选项之一,检查 Istio CNI 是否已经安装并进行升级:
|
||||
|
||||
{{< tabset category-name="controlplaneupdate" >}}
|
||||
{{< tab name="Kubernetes rolling update" category-value="k8supdate" >}}
|
||||
|
||||
您可以使用 Kubernetes 的滚动更新机制来升级 Istio CNI 组件。这适用于使用 `kubectl apply` 部署 Istio CNI 的情况。
|
||||
|
||||
1. 检查是否已安装 `istio-cni`。找到 `istio-cni-node` pod 以及它们运行的命名空间(通常是 `kube-system` 或 `istio-system`):
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl get pods -l k8s-app=istio-cni-node --all-namespaces
|
||||
$ NAMESPACE=$(kubectl get pods -l k8s-app=istio-cni-node --all-namespaces --output='jsonpath={.items[0].metadata.namespace}')
|
||||
{{< /text >}}
|
||||
|
||||
1. 如果 `istio-cni` 安装在 `kube-system` 以外的命名空间(例如:`istio-system`),请删除 `istio-cni`:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio-cni --name=istio-cni --namespace=$NAMESPACE | kubectl delete -f -
|
||||
{{< /text >}}
|
||||
|
||||
1. 在 `kube-system` 命名空间中安装或升级 `istio-cni`:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio-cni --name=istio-cni --namespace=kube-system | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Helm upgrade" category-value="helmupgrade" >}}
|
||||
|
||||
如果您已使用 [Helm and Tiller](/zh/docs/setup/install/helm/#option-2-install-with-helm-and-tiller-via-helm-install) 安装 Istio CNI,请优先使用 Helm 升级 Istio CNI。
|
||||
|
||||
1. 检查 `istio-cni` 是否已安装,并检查安装在哪个命名空间:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm status istio-cni
|
||||
{{< /text >}}
|
||||
|
||||
1. 根据下面几种情况来安装或升级 `istio-cni`:
|
||||
|
||||
* 如您尚未安装 `istio-cni`,并决定安装它,则运行以下命令:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio-cni --name istio-cni --namespace kube-system
|
||||
{{< /text >}}
|
||||
|
||||
* 如果 `istio-cni` 已被安装到 `kube-system` 以外的命名空间(例如:`istio-system`)中,请先运行以下命令删除:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm delete --purge istio-cni
|
||||
{{< /text >}}
|
||||
|
||||
然后,将其安装到 `kube-system` 命名空间中:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm install install/kubernetes/helm/istio-cni --name istio-cni --namespace kube-system
|
||||
{{< /text >}}
|
||||
|
||||
* 如果 `istio-cni` 已被安装到命名空间 `kube-system` 中,则运行以下命令升级:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm upgrade istio-cni install/kubernetes/helm/istio-cni --namespace kube-system
|
||||
{{< /text >}}
|
||||
|
||||
{{< /tab >}}
|
||||
{{< /tabset >}}
|
||||
|
||||
### 控制平面升级{#control-plane-upgrade}
|
||||
|
||||
Pilot, Galley, 策略, 遥测和 Sidecar 注入器。
|
||||
选择下列 **互斥** 选项中的一种升级控制平面:
|
||||
|
||||
{{< tabset category-name="controlplaneupdate" >}}
|
||||
{{< tab name="Kubernetes rolling update" category-value="k8supdate" >}}
|
||||
|
||||
您可以使用 Kubernetes 的滚动升级机制来升级控制平面组件。这适用于使用 `kubectl apply` 部署 Istio 组件的情况,包括使用 [Helm template](/zh/docs/setup/install/helm/#option-1-install-with-helm-via-helm-template) 生成的配置。
|
||||
|
||||
1. 使用 `kubectl apply` 命令升级所有 Istio 的 CRD。等待 Kubernetes API 服务器提交升级的 CRD:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f install/kubernetes/helm/istio-init/files/
|
||||
{{< /text >}}
|
||||
|
||||
1. {{< boilerplate verify-crds >}}
|
||||
|
||||
1. 应用更新模板:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm template install/kubernetes/helm/istio --name istio \
|
||||
--namespace istio-system | kubectl apply -f -
|
||||
{{< /text >}}
|
||||
|
||||
您必须使用与首次[安装 Istio](/zh/docs/setup/install/helm) 相同的配置。
|
||||
|
||||
滚动更新进程会将所有的部署组件和 configmap 升级到新版本。当此进程执行完毕后,您的 Istio 控制平面将会升级到新版本。
|
||||
|
||||
您现有的应用程序无需任何更改,可以继续运行。如果新的控制平面有任何严重的问题,您可以通过应用旧版本的 yaml 文件来回滚此次变更。
|
||||
|
||||
{{< /tab >}}
|
||||
|
||||
{{< tab name="Helm upgrade" category-value="helmupgrade" >}}
|
||||
|
||||
如果您使用 [Helm and Tiller](/zh/docs/setup/install/helm/#option-2-install-with-helm-and-tiller-via-helm-install) 安装 Istio,推荐的方式是使用 Helm 来进行升级。
|
||||
|
||||
1. 升级 `istio-init` chart 来更新所有 Istio [用户资源定义](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/#customresourcedefinitions)(CRD)。
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm upgrade --install istio-init install/kubernetes/helm/istio-init --namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
1. {{< boilerplate verify-crds >}}
|
||||
|
||||
1. 升级 `istio` chart:
|
||||
|
||||
{{< text bash >}}
|
||||
$ helm upgrade istio install/kubernetes/helm/istio --namespace istio-system
|
||||
{{< /text >}}
|
||||
|
||||
如果安装了 Istio CNI,则通过添加 `--set istio_cni.enabled=true` 配置项来启用它。
|
||||
|
||||
{{< /tab >}}
|
||||
{{< /tabset >}}
|
||||
|
||||
### Sidecar 升级{#sidecar-upgrade}
|
||||
|
||||
在升级控制平面后,已运行 Istio 的应用仍将使用旧的 sidecar。要升级 sidecar,您需要重新注入它。
|
||||
|
||||
如果您使用自动的 sidecar 注入方式,可以滚动更新所有 pod 来升级 sidecar。这样,新版本的 sidecar 将被自动重新注入。
|
||||
|
||||
{{< warning >}}
|
||||
要运行以下命令,`kubectl` 的版本需要 >= 1.15,必要时请进行升级。
|
||||
{{< /warning >}}
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl rollout restart deployment --namespace default
|
||||
{{< /text >}}
|
||||
|
||||
如果使用手动注入,可以通过以下命令升级 sidecar:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f <(istioctl kube-inject -f $ORIGINAL_DEPLOYMENT_YAML)
|
||||
{{< /text >}}
|
||||
|
||||
如果 sidecar 之前使用了一些定制的配置文件注入,则需要将配置文件中的版本更改为新版本,并通过以下命令重新注入:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -f <(istioctl kube-inject \
|
||||
--injectConfigFile inject-config.yaml \
|
||||
--filename $ORIGINAL_DEPLOYMENT_YAML)
|
||||
{{< /text >}}
|
|
@ -1,221 +0,0 @@
|
|||
---
|
||||
title: 多版本的 Gateway 管理
|
||||
description: 使用 Gateway 配置和升级 Istio。
|
||||
weight: 30
|
||||
keywords: [kubernetes,upgrading,gateway]
|
||||
owner: istio/wg-environments-maintainers
|
||||
test: no
|
||||
status: Experimental
|
||||
---
|
||||
|
||||
{{< boilerplate experimental >}}
|
||||
|
||||
使用一个 `IstioOperator` CR,即使在使用 [金丝雀升级](/zh/docs/setup/upgrade/canary),CR 中定义的任何 Gateway (包括安装在默认配置文件中的 `istio-ingressgateway`)也会被热升级。但应该避免这样,因为 Gateway 是影响应用程序正常运行时的关键组件。在新的控制和数据平面可以正常工作以后,再升级 Gateway 。
|
||||
|
||||
本指南将会向您介绍通过在单独的 `IstioOperator` CR 中定义和管理来升级 Gateway 的推荐方法,与用于安装和管理控制平面的设备分开。
|
||||
|
||||
{{< warning >}}
|
||||
为了避免 `.`(点)在一些 Kubernetes 的路径中不是有效字符,修订名称不应该包含 `.`(点)。
|
||||
{{< /warning >}}
|
||||
|
||||
## istioctl
|
||||
|
||||
本节介绍了使用 `istioctl` 单独安装和升级控制平面和 Gateway 。该示例演示了如何使用金丝雀升级方法将 Istio 1.8.0 升级到 1.8.1,并将控制平面的 Gateway 和其他 Gateway 分开管理。
|
||||
|
||||
### 使用 `istioctl` 安装{#installation-with-istioctl}
|
||||
|
||||
1. 确保主 `IstioOperator` CR 具有名字并且没有安装 Gateway :
|
||||
|
||||
{{< text yaml >}}
|
||||
# 文件名: control-plane.yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
metadata:
|
||||
name: control-plane # REQUIRED
|
||||
spec:
|
||||
profile: minimal
|
||||
{{< /text >}}
|
||||
|
||||
1. 为 Gateway 创建单独的 `IstioOperator` CR,确保具有名字且使用 `empty` profile:
|
||||
|
||||
{{< text yaml >}}
|
||||
# 文件名: Gateway .yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
metadata:
|
||||
name: Gateway # REQUIRED
|
||||
spec:
|
||||
profile: empty # REQUIRED
|
||||
components:
|
||||
ingressGateway :
|
||||
- name: istio-ingressgateway
|
||||
enabled: true
|
||||
{{< /text >}}
|
||||
|
||||
1. 安装 `CR`:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.0/bin/istioctl install -n istio-system -f control-plane.yaml --revision 1-8-0
|
||||
$ istio-1.8.0/bin/istioctl install -n istio-system -f Gateway .yaml --revision 1-8-0
|
||||
{{< /text >}}
|
||||
|
||||
Istioctl 的安装和操作动作通过 revision 和拥有者的 CR 名称进行确定具有所有权的资源。只有传递给 `istioctl` 安装、操作资源的名称和 revision 标签可以被 `IstioOperator` CR 匹配时,该资源才会受到 CR 更改的影响,集群内的其他资源都将被忽略。注意确保每个 `IstioOperator` 安装的组件不会与另一个 `IstioOperator` CR 相互重叠,否则两个 CR 会导致控制器或 `istioctl` 命令相互干扰。
|
||||
|
||||
### 使用 `istioctl` 升级 {#upgrade-with-istioctl}
|
||||
|
||||
假设目标版本为 1.8.1。
|
||||
|
||||
1. 下载 Istio 1.8.1 版本,并使用该版本的 `istioctl` 来安装 Istio 1.8.1 的控制平面:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.1/bin/istioctl install -f control-plane.yaml --revision 1-8-1
|
||||
{{< /text >}}
|
||||
|
||||
(有关步骤2-4的更多详细信息,请参阅金丝雀升级文档。)
|
||||
|
||||
1. 验证控制平面是否正确运行。
|
||||
|
||||
1. 使用 istio.io/rev=1-8-1 标记工作负载的命名空间,并且重启相应的工作负载。
|
||||
|
||||
1. 验证工作负载是否已经注入新的代理版本,并且集群已经正常运行。
|
||||
|
||||
1. 此时,Ingress Gateway 仍然是 1.8.0 的版本。您应该可以看到一下容器正在运行:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl get pods -n istio-system --show-labels
|
||||
|
||||
NAME READY STATUS RESTARTS AGE LABELS
|
||||
istio-ingressgateway-65f8bdd46c-d49wf 1/1 Running 0 21m service.istio.io/canonical-revision=1-8-0 ...
|
||||
istiod-1-8-0-67f9b9b56-r22t5 1/1 Running 0 22m istio.io/rev=1-8-0 ...
|
||||
istiod-1-8-1-75dfd7d494-xhmbb 1/1 Running 0 21s istio.io/rev=1-8-1 ...
|
||||
{{< /text >}}
|
||||
|
||||
最后一步,将集群中的所有 Gateway 升级到新版本:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.1/bin/istioctl install -f Gateway .yaml --revision 1-8-1
|
||||
{{< /text >}}
|
||||
|
||||
1. 删除 1.8.1 版本的控制平面:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.1/bin/istioctl x uninstall --revision 1-8-0
|
||||
{{< /text >}}
|
||||
|
||||
## Operator
|
||||
|
||||
本节介绍使用 Istio operator 单独安装和升级控制平面与 Gateway 。下面示例演示如何使用金丝雀升级方法将 Istio 1.8.0 升级到 1.8.1,并且分别管理控制平面和 Gateway 。
|
||||
|
||||
### 使用 Operator 安装{#installation-with-operator}
|
||||
|
||||
1. 使用 Istio Operator 向集群中安装一个修正版:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.0/bin/istioctl operator init --revision 1-8-0
|
||||
{{< /text >}}
|
||||
|
||||
1. 确保主 `IstioOperator` CR 具有名字和 revision,并且没有安装 Gateway :
|
||||
|
||||
{{< text yaml >}}
|
||||
# 文件名: control-plane-1-8-0.yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
metadata:
|
||||
name: control-plane-1-8-0 # REQUIRED
|
||||
spec:
|
||||
profile: minimal
|
||||
revision: 1-8-0 # REQUIRED
|
||||
{{< /text >}}
|
||||
|
||||
1. 为 Gateway 创建一个单独的 `IstioOperator` CR,确保具有名字并且使用了 `empty` profile:
|
||||
|
||||
{{< text yaml >}}
|
||||
# 文件名: Gateway .yaml
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
metadata:
|
||||
name: Gateway # REQUIRED
|
||||
spec:
|
||||
profile: empty # REQUIRED
|
||||
revision: 1-8-0 # REQUIRED
|
||||
components:
|
||||
ingressGateway :
|
||||
- name: istio-ingressgateway
|
||||
enabled: true
|
||||
{{< /text >}}
|
||||
|
||||
1. 在集群中执行以下命令来完成部署:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl create namespace istio-system
|
||||
$ kubectl apply -n istio-system -f control-plane-1-8-0.yaml
|
||||
$ kubectl apply -n istio-system -f Gateway .yaml
|
||||
{{< /text >}}
|
||||
|
||||
验证 Operator 和 Istio 的控制平面已经完成安装并且正在运行。
|
||||
|
||||
### 通过 Operator 升级{#upgrade-with-operator}
|
||||
|
||||
假设目标版本为 1.8.1。
|
||||
|
||||
1. 下载 Istio 1.8.1 版本,并且使用 1.8.1 版本的 `istioctl` 安装 Istio 1.8.1 的 Operator:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istio-1.8.1/bin/istioctl operator init --revision 1-8-1
|
||||
{{< /text >}}
|
||||
|
||||
1. 将上述安装步骤中的控制平面 CR 赋值为 `control-plane-108-1.yaml`。将文件中的 `1-8-0` 修改为 `1-8-1`。
|
||||
|
||||
1. 使用新文件部署到集群中:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -n istio-system -f control-plane-1-8-1.yaml
|
||||
{{< /text >}}
|
||||
|
||||
1. 验证两个版本的 `istiod` 都在集群中运行。Operator 可能需要几分钟时间来安装新的控制平面,并使其变为运行状态。
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl -n istio-system get pod -l app=istiod
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
istiod-1-8-0-74f95c59c-4p6mc 1/1 Running 0 68m
|
||||
istiod-1-8-1-65b64fc749-5zq8w 1/1 Running 0 13m
|
||||
{{< /text >}}
|
||||
|
||||
1. 有关工作负载过渡到新的 Istio 版本的更多详细信息,请查阅金丝雀升级文档。
|
||||
|
||||
- 使用 istio.io/rev=1-8-1 标记工作负载的命名空间,并且重启相应的工作负载。
|
||||
- 验证工作负载是否已经注入新的代理版本,并且集群已经正常运行。
|
||||
|
||||
1. 将 Gateway 升级到新版本。在安装步骤中,编辑 `Gateway.yaml` 文件,将所有的 `1-8-0` 替换为 `1-8-1` 的版本,并重新部署该文件:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl apply -n istio-system -f Gateway .yaml
|
||||
{{< /text >}}
|
||||
|
||||
1. 执行 Gateway 部署的滚动重启:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl rollout restart deployment -n istio-system istio-ingressgateway
|
||||
{{< /text >}}
|
||||
|
||||
1. 验证 Gateway 是 1.8.1 版本并且已经运行:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl -n istio-system get pod -l app=istio-ingressgateway --show-labels
|
||||
NAME READY STATUS RESTARTS AGE LABELS
|
||||
istio-ingressgateway-66dc957bd8-r2ptn 1/1 Running 0 14m app=istio-ingressgateway,service.istio.io/canonical-revision=1-8-1...
|
||||
{{< /text >}}
|
||||
|
||||
1. 卸载控制平面:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl delete istiooperator -n istio-system control-plane-1-8-0
|
||||
{{< /text >}}
|
||||
|
||||
1. 验证只有一个版本的 `istiod` 正在集群中运行:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl -n istio-system get pod -l app=istiod
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
istiod-1-8-1-65b64fc749-5zq8w 1/1 Running 0 16m
|
||||
{{< /text >}}
|
|
@ -1,92 +0,0 @@
|
|||
---
|
||||
title: 使用 istioctl 命令升级 Istio [实验中]
|
||||
description: 使用 istioctl 命令来升级或降级 Istio。
|
||||
weight: 25
|
||||
keywords: [kubernetes,upgrading]
|
||||
---
|
||||
|
||||
{{< boilerplate experimental-feature-warning >}}
|
||||
|
||||
`istioctl experimental upgrade` 命令可为 Istio 进行升级。在进行升级之前,升级命令首先检查已安装的 Istio 是否符合升级要求。此外,如果升级命令检测到 Istio 版本间,配置中有任何默认值发生变化,都将及时提醒用户。
|
||||
|
||||
升级命令也可为 Istio 降级。
|
||||
|
||||
查看 [`istioctl` 升级参考](/zh/docs/reference/commands/istioctl/#istioctl-experimental-upgrade)来获取 `istioctl experimental upgrade` 命令的更多功能。
|
||||
|
||||
## 升级前置条件{#upgrade-prerequisites}
|
||||
|
||||
确保您在开始升级之前满足以下要求:
|
||||
|
||||
* 已安装 Istio 1.3.3 或更高版本。
|
||||
|
||||
* Istio 是[使用 {{< istioctl >}}](/zh/docs/setup/install/istioctl/) 命令安装的。
|
||||
|
||||
## 升级步骤{#upgrade-steps}
|
||||
|
||||
{{< warning >}}
|
||||
升级过程中可能发生流量中断。为了缩短流量中断时间,请确保每个组件(Citadel 除外)至少运行有两个副本。同时,确保 [`PodDisruptionBudgets`](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) 配置最小可用性为 1。
|
||||
{{< /warning >}}
|
||||
|
||||
本节中的命令应该使用新版本的 `istioctl` 命令运行,可以在下载包的 `bin/` 目录中找到该命令。
|
||||
|
||||
1. [下载新版本 Istio](/zh/docs/setup/getting-started/#download) 并切换目录为新版本目录。
|
||||
|
||||
1. 查看支持的版本列表,验证 `istoctl` 命令是否支持从当前版本升级
|
||||
|
||||
{{< text bash >}}
|
||||
$ istioctl manifest versions
|
||||
{{< /text >}}
|
||||
|
||||
1. 确保 Kubernetes 配置指向要升级的集群:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl config view
|
||||
{{< /text >}}
|
||||
|
||||
1. 运行以下命令开始升级:
|
||||
|
||||
{{< text bash >}}
|
||||
$ istioctl experimental upgrade -f `<your-custom-configuration-file>`
|
||||
{{< /text >}}
|
||||
|
||||
`<your-custom-configuration-file>` 是
|
||||
[IstioControlPlane API Custom Resource Definition](/zh/docs/setup/install/istioctl/#configure-the-feature-or-component-settings)
|
||||
文件,该文件用于自定义安装当前运行版本的 Istio。
|
||||
|
||||
{{< warning >}}
|
||||
如果您安装 Istio 时,使用了 `-f` 选项,例如:`istioctl manifest apply -f <IstioControlPlane-custom-resource-definition-file>`,那么 `istioctl upgrade` 命令也必须使用相同的 `-f` 选项参数值。
|
||||
{{< /warning >}}
|
||||
|
||||
`istioctl upgrade` 命令不支持 `--set` 选项。因此,如果您的 Istio 是使用 `--set` 选项安装的,请创建一个与配置项等效的配置文件,并将其传递给 `istioctl upgrade` 命令。使用 `-f` 选项来加载配置文件。
|
||||
|
||||
如果省略了 `-f` 选项,Istio 将使用默认配置升级。
|
||||
|
||||
在执行多个步骤的检查后,`istioctl` 将要求您确认是否继续。
|
||||
|
||||
1. `istioctl` 将安装新版本的 Istio 控制平面,并显示完成状态。
|
||||
|
||||
1. 在使用 `istioctl` 命令升级完成后,必须手动重启包含 Istio sidecar 的 pod 来更新数据平面:
|
||||
|
||||
{{< text bash >}}
|
||||
$ kubectl rollout restart deployment
|
||||
{{< /text >}}
|
||||
|
||||
## 降级前置条件{#downgrade-prerequisites}
|
||||
|
||||
确保您在开始升级之前满足以下要求:
|
||||
|
||||
* 已安装 Istio 1.4 或更高版本。
|
||||
|
||||
* Istio 是[使用 {{< istioctl >}}](/zh/docs/setup/install/istioctl/) 命令安装的。
|
||||
|
||||
* 降级命令 `istioctl` 的版本需要与要降级到的 Istio 版本相对应。例如:要将 Istio 从版本 1.4 降级到 1.3.3,需要使用 1.3.3 版本的 `istioctl` 命令。
|
||||
|
||||
## 降级到 Istio 1.4 或更高版本的步骤{#downgrade-to-Istio-1-4-and-higher-versions-steps}
|
||||
|
||||
您也可以使用 `istioctl upgrade` 命令降级 Istio 版本。步骤与前一部分提到的升级步骤相同,即使用低版本 Istio 配套的 `istioctl` 命令来降级。降级完成后,Istio 将会恢复到运行 `istioctl experimental upgrade` 命令以前的安装版本。
|
||||
|
||||
### 降级到 Istio 1.3.3 或更低版本的步骤{#downgrade-to-Istio-1-3-3-and-lower-versions-steps}
|
||||
|
||||
`istioctl experimental upgrade` 命令在 Istio 1.3.3 及更低版本中是不可用的。因此,降级必须使用 `istioctl experimental manifest apply` 命令。
|
||||
|
||||
该命令与 `istioctl experimental upgrade` 命令安装的 Istio 控制平面相同,但不会进行任何检查。例如:配置文件中使用的默认值如果发生变化,将不会提醒用户。
|
Loading…
Reference in New Issue