Simplify the bookinfo instructions for auto injection (#3393)

* Simplify the bookinfo instructions

* Address code review comments

* Update content/docs/examples/bookinfo/index.md

Co-Authored-By: andraxylia <andraxylia@users.noreply.github.com>

* Fix broken links

* Update content/docs/examples/bookinfo/index.md

Co-Authored-By: andraxylia <andraxylia@users.noreply.github.com>

* Update content/docs/examples/bookinfo/index.md

Co-Authored-By: andraxylia <andraxylia@users.noreply.github.com>

* Address code review comments

* Remove trailing whitespaces
This commit is contained in:
Andra Cismaru 2019-03-08 12:06:45 -08:00 committed by Lin Sun
parent 3b0cd328ee
commit 81567df124
1 changed files with 23 additions and 24 deletions

View File

@ -66,35 +66,22 @@ To start the application, follow the instructions corresponding to your Istio ru
If you use GKE, please ensure your cluster has at least 4 standard GKE nodes. If you use Minikube, please ensure you have at least 4GB RAM.
{{< /tip >}}
1. Change directory to the root of the Istio installation directory.
1. Change directory to the root of the Istio installation.
1. Bring up the application containers:
* If you are using [manual sidecar injection](/docs/setup/kubernetes/additional-setup/sidecar-injection/#manual-sidecar-injection),
use the following command
{{< text bash >}}
$ kubectl apply -f <(istioctl kube-inject -f @samples/bookinfo/platform/kube/bookinfo.yaml@)
{{< /text >}}
The `istioctl kube-inject` command is used to manually modify the `bookinfo.yaml`
file before creating the deployments as documented [here](/docs/reference/commands/istioctl/#istioctl-kube-inject).
* If you are using a cluster with
[automatic sidecar injection](/docs/setup/kubernetes/additional-setup/sidecar-injection/#automatic-sidecar-injection)
enabled, label the `default` namespace with `istio-injection=enabled`
1. The default Istio installation uses [automatic sidecar injection](/docs/setup/kubernetes/additional-setup/sidecar-injection/#automatic-sidecar-injection).
Label the namespace that will host the application with `istio-injection=enabled`:
{{< text bash >}}
$ kubectl label namespace default istio-injection=enabled
{{< /text >}}
Then simply deploy the services using `kubectl`
1. Deploy your application using the `kubectl` command:
{{< text bash >}}
$ kubectl apply -f @samples/bookinfo/platform/kube/bookinfo.yaml@
{{< /text >}}
Either of the above commands launches all four microservices as illustrated in the above diagram.
The command launches all four services shown in the `bookinfo` application architecture diagram.
All 3 versions of the reviews service, v1, v2, and v3, are started.
{{< tip >}}
@ -102,6 +89,18 @@ If you use GKE, please ensure your cluster has at least 4 standard GKE nodes. If
over time instead of deploying all versions simultaneously.
{{< /tip >}}
If you disabled automatic sidecar injection during installation and rely on [manual sidecar injection]
(/docs/setup/kubernetes/additional-setup/sidecar-injection/#manual-sidecar-injection),
use the `istioctl kube-inject` command to modify the `bookinfo.yaml`
file before deploying your application. For more information please
visit the `istioctl` [reference documentation](/docs/reference/commands/istioctl/#istioctl-kube-inject).
{{< text bash >}}
$ kubectl apply -f <(istioctl kube-inject -f @samples/bookinfo/platform/kube/bookinfo.yaml@)
{{< /text >}}
1. Confirm all services and pods are correctly defined and running:
{{< text bash >}}