Add docs for new istioctl and operator change (#7791)

* Add docs for new istioctl and operator change

* fix lint and address some comments

* address more comments

* add instruction for helm

* address new comments

* fix new comments

* Update content/en/docs/setup/install/standalone-operator/index.md

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>

* address comments

Co-authored-by: Frank Budinsky <frankb@ca.ibm.com>
This commit is contained in:
Xinnan Wen 2020-07-30 06:24:09 -07:00 committed by GitHub
parent 4521eb0239
commit 15aa657bb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 100 additions and 2 deletions

View File

@ -657,7 +657,23 @@ The --set flag also creates any intermediate nodes in the path that are missing
## Uninstall Istio
To uninstall Istio, run the following command:
To completely uninstall Istio from a cluster, run the following command:
{{< text bash >}}
$ istioctl x uninstall --purge
{{< /text >}}
{{< warning >}}
The optional `--purge` flag will remove all Istio resources, including cluster-scoped resources that may be shared with other Istio control planes.
{{< /warning >}}
Alternatively, to remove only a specific Istio control plane, run the following command:
{{< text bash >}}
$ istioctl x uninstall <your original installation options>
{{< /text >}}
or
{{< text bash >}}
$ istioctl manifest generate <your original installation options> | kubectl delete -f -

View File

@ -184,9 +184,65 @@ $ kubectl logs -f -n istio-operator $(kubectl get pods -n istio-operator -lname=
Refer to the [`IstioOperator` API](/docs/reference/config/istio.operator.v1alpha1/#IstioOperatorSpec)
for the complete set of configuration settings.
## Canary Upgrade
You can use the operator to do a canary upgrade of an Istio control plane, the process is similar to the [canary upgrade with `istioctl`](/docs/setup/upgrade/#canary-upgrades).
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:
{{< text bash >}}
$ kubectl get iop --all-namespaces
NAMESPACE NAME REVISION STATUS AGE
istio-system example-istiocontrolplane HEALTHY 11m
{{< /text >}}
Then run the following command to install the new revision of the Istio control plane based on the in-cluster `IstioOperator` CR:
{{< text bash >}}
$ istioctl operator init --revision 1-7-0
{{< /text >}}
{{< tip >}}
You can alternatively use Helm to deploy another operator with a different revision setting:
{{< text bash >}}
$ helm template manifests/charts/istio-operator/ \
--set hub=docker.io/istio \
--set tag={{< istio_full_version >}} \
--set operatorNamespace=istio-operator \
--set revision=1-7-0 \
--set watchedNamespaces=istio-system | kubectl apply -f -
{{< /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:
{{< 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-7-0-55887f699c-t8bh8 1/1 Running 0 8m13s
{{< /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 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 10m
istiod-1-7-0 ClusterIP 10.87.4.92 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP,853/TCP 7m55s
{{< /text >}}
## Uninstall
Delete the Istio deployment:
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 <revision>
{{< /text >}}
Otherwise, delete the in-cluster `IstioOperator` CR, which will uninstall all revisions of Istio that may be running:
{{< text bash >}}
$ kubectl delete istiooperators.install.istio.io -n istio-system example-istiocontrolplane
@ -205,6 +261,12 @@ Or:
$ kubectl delete ns istio-operator --grace-period=0 --force
{{< /text >}}
If you used the operator to perform a canary upgrade of the control plane, do not delete the in-cluster `IstioOperator` CR. Instead, you can uninstall the old control plane and keep the new one by running the following command:
{{< text bash >}}
$ istioctl operator remove --revision <revision>
{{< /text >}}
Note that deleting the operator before Istio is fully removed may result in leftover Istio resources.
To clean up anything not removed by the operator:

View File

@ -36,7 +36,9 @@ $ kubectl get pods -n istio-system
NAME READY STATUS RESTARTS AGE
istiod-786779888b-p9s5n 1/1 Running 0 114m
istiod-canary-6956db645c-vwhsk 1/1 Running 0 1m
{{< /text >}}
{{< text bash >}}
$ kubectl -n istio-system get svc -lapp=istiod
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istiod ClusterIP 10.32.5.247 <none> 15010/TCP,15012/TCP,443/TCP,15014/TCP 33d
@ -90,6 +92,24 @@ $ istioctl proxy-config endpoints ${pod_name}.test-ns --cluster xds-grpc -ojson
The output confirms that the pod is using `istiod-canary` revision of the control plane.
### Uninstall old control plane
After upgrading both the control plane and data plane, you can uninstall the old control plane. For example, the following command uninstalls a control plane of revision `istio-1-6-5`:
{{< text bash >}}
$ istioctl x uninstall --revision istio-1-6-5
{{< /text >}}
Confirm that the old control plane has been removed and only the new one still exists in the cluster:
{{< text bash >}}
$ kubectl get pods -n istio-system -lapp=istiod
NAME READY STATUS RESTARTS AGE
istiod-canary-55887f699c-t8bh8 1/1 Running 0 27m
{{< /text >}}
Note that the above instructions only removed the resources for the specified control plane revision, but not cluster-scoped resources shared with other control planes. To uninstall Istio completely, refer to the [uninstall guide](/docs/setup/install/istioctl/#uninstall-istio).
## In place upgrades
The `istioctl upgrade` command performs an upgrade of Istio. Before performing