diff --git a/content/en/docs/setup/install/operator/index.md b/content/en/docs/setup/install/operator/index.md index 6264c137a4..e32b38ffec 100644 --- a/content/en/docs/setup/install/operator/index.md +++ b/content/en/docs/setup/install/operator/index.md @@ -197,7 +197,7 @@ $ kubectl get pods --namespace istio-system \ ## Canary Upgrade -The process for canary upgrade is similar to the [canary upgrade with `istioctl`](/docs/setup/upgrade/#canary-upgrades). +The process for canary upgrade is similar to the [canary upgrade with `istioctl`](/docs/setup/upgrade/canary/). For example, to upgrade the revision of Istio installed in the previous section, first verify that the `IstioOperator` CR named `example-istiocontrolplane` exists in your cluster: @@ -224,27 +224,42 @@ $ helm install istio-operator manifests/charts/istio-operator \ --set tag={{< istio_full_version >}} \ --set operatorNamespace=istio-operator \ --set watchedNamespaces=istio-system \ - --set revision=1-7-0 + --set revision=1-8-1 {{< /text >}} Note that you need to [download the Istio release](/docs/setup/getting-started/#download) to run the above command. {{< /tip >}} -After running the command, you will have two control plane deployments and services running side-by-side: +Make a copy of the `example-istiocontrolplane` CR and save it in a file named `example-istiocontrolplane-1-8-1.yaml`. +Change the name to `example-istiocontrolplane-1-8-1` and add `revision: 1-8-1` to the CR. +Your updated `IstioOperator` CR should look something like this: {{< text bash >}} -$ kubectl get pods -n istio-system -l app=istiod -NAME READY STATUS RESTARTS AGE -istiod-5f4f9dd5fc-4xc8p 1/1 Running 0 10m -istiod-1-8-1-55887f699c-t8bh8 1/1 Running 0 8m13s +$ cat example-istiocontrolplane-1-8-1.yaml +apiVersion: install.istio.io/v1alpha1 +kind: IstioOperator +metadata: + namespace: istio-system + name: example-istiocontrolplane-1-8-1 +spec: + revision: 1-8-1 +{{< /text >}} + +Apply the updated `IstioOperator` CR to the cluster. After that, you will have two control plane deployments and services running side-by-side: + +{{< text bash >}} +$ kubectl get pod -n istio-system -l app=istiod +NAME READY STATUS RESTARTS AGE +istiod-1-8-1-597475f4f6-bgtcz 1/1 Running 0 64s +istiod-6ffcc65b96-bxzv5 1/1 Running 0 2m11s {{< /text >}} {{< text bash >}} -$ kubectl -n istio-system get svc -l app=istiod -NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -istiod ClusterIP 10.87.7.69 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 10m -istiod-1-8-1 ClusterIP 10.87.4.92 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 7m55s +$ kubectl get svc -n istio-system -l app=istiod +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +istiod ClusterIP 10.104.129.150 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 2m35s +istiod-1-8-1 ClusterIP 10.111.17.49 15010/TCP,15012/TCP,443/TCP,15014/TCP 88s {{< /text >}} To complete the upgrade, label the workload namespaces with `istio.io/rev=1-8-1` and restart the workloads, as @@ -252,32 +267,23 @@ explained in the [Data plane upgrade](/docs/setup/upgrade/canary/#data-plane) do ## Uninstall -If you used the operator to perform a canary upgrade of the control plane, you can uninstall the old control plane and keep the new one by running the following command: - -{{< text bash >}} -$ istioctl operator remove --revision -{{< /text >}} - -Otherwise, delete the in-cluster `IstioOperator` CR, which will uninstall all revisions of Istio that may be running: +If you used the operator to perform a canary upgrade of the control plane, you can uninstall the old control plane and keep the new one by deleting the old in-cluster `IstioOperator` CR, which will uninstall the old revision of Istio: {{< text bash >}} $ kubectl delete istiooperators.install.istio.io -n istio-system example-istiocontrolplane {{< /text >}} Wait until Istio is uninstalled - this may take some time. -Delete the Istio operator: + +Then you can remove the Istio operator for the old revision by running the following command: {{< text bash >}} -$ istioctl operator remove +$ istioctl operator remove --revision {{< /text >}} -Or: +If you omit the `revision` flag, then all revisions of Istio operator will be removed. -{{< text bash >}} -$ kubectl delete ns istio-operator --grace-period=0 --force -{{< /text >}} - -Note that deleting the operator before Istio is fully removed may result in leftover Istio resources. +Note that deleting the operator before the `IstioOperator` CR and corresponding Istio revision are fully removed may result in leftover Istio resources. To clean up anything not removed by the operator: {{< text bash >}}