Skip to content

Commit fae2bfa

Browse files
Merge pull request #6 from vr-varad/fix/update-service-mesh
Update Mastering Service Mesh Learning Path
2 parents 1ef73d7 + 91bf458 commit fae2bfa

25 files changed

+150
-275
lines changed

content/learning-paths/11111111-1111-1111-1111-111111111111/mastering-service-meshes-for-developers/advance-concepts-of-service-meshes/deploy-an-application.md

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,22 @@ title: "Deploy a sample application"
1212

1313
To play with Istio and demonstrate some of it's capabilities, you will deploy the example BookInfo application, which is included the Istio package.
1414

15-
<h2 class="chapter-sub-heading">What is the Bookinfo Application </h2>
16-
<br />
15+
### **What is the Bookinfo Application**
16+
1717
This application is a polyglot composition of microservices are written in different
1818
languages and sample BookInfo application displays information about a book, similar to a
1919
single catalog entry of an online book store. Displayed on the page is a description of
2020
the book, book details (ISBN, number of pages, and so on), and a few book reviews.
2121

22-
The end-to-end architecture of the application is shown in the figure.
23-
24-
<br />
25-
26-
_Figure: BookInfo deployed off the mesh_
2722

28-
<br />
2923
It’s worth noting that these services have no dependencies on Istio, but make an interesting
3024
service mesh example, particularly because of the multitude of services, languages and versions
3125
for the reviews service.
3226

3327
As shown in the figure below, proxies are sidecarred to each of the application containers.
3428

35-
<br />
3629
_Figure: BookInfo deployed on the mesh_
3730

38-
<br />
3931
Sidecars proxy can be either manually or automatically injected into the pods. Automatic sidecar
4032
injection requires that your Kubernetes api-server supports `admissionregistration.k8s.io/v1`
4133
or `admissionregistration.k8s.io/v1beta1` or `admissionregistration.k8s.io/v1beta2` APIs. Verify
@@ -49,12 +41,10 @@ If your environment **does NOT** supports either of these two APIs, then you may
4941

5042
As part of Istio deployment in [Previous chapter](./getting-started), you have deployed the sidecar injector.
5143

52-
<br />
5344
<h2 class="chapter-sub-heading">
5445
<a name="auto"></a> Deploying Sample App with Automatic sidecar injection
5546
</h2>
5647

57-
<br />
5848
Istio, deployed as part of this workshop, will also deploy the sidecar injector. Let us now
5949
verify sidecar injector deployment.
6050

@@ -96,9 +86,7 @@ This will do 3 things:
9686
1. Deploys all the BookInfo services in the `default` namespace.
9787
1. Deploys the virtual service and gateway needed to expose the BookInfo's productpage application in the `default` namespace.
9888

99-
<h3 class="chapter-sub-heading">
100-
<a name="verify"></a> Verify Bookinfo deployment{" "}
101-
</h3>
89+
#### **Verify Bookinfo deployment**
10290

10391
1. Verify that the deployments are all in a state of AVAILABLE before continuing.
10492

@@ -122,13 +110,9 @@ kubectl describe svc productpage
122110

123111
Next, you will expose the BookInfo application to be accessed external from the cluster.
124112

125-
<br />
126-
<h3>Alternative: Manual installation </h3>
113+
#### **Alternative: Manual installation**
127114
Follow this if the above steps did not work for you
128-
<br />
129-
<br />
130-
131-
<h4 class="chapter-alt-heading"> Label namespace for injection</h4>
115+
##### **Label namespace for injection**
132116

133117
Label the default namespace with istio-injection=enabled
134118

@@ -150,23 +134,21 @@ kube-public Active 1h
150134
kube-system Active 1h
151135
```
152136

153-
<h4 class="chapter-alt-heading"> Deploy BookInfo</h4>
154-
<br />
137+
#### **Deploy BookInfo**
155138

156139
Applying this yaml file included in the Istio package you collected in [Getting Started](./getting-started) will deploy the BookInfo app in you cluster.
157140

158141
```sh
159142
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml
160143
```
161144

162-
<h4 class="chapter-alt-heading">Deploy Gateway and Virtual Service for BookInfo app</h4>
145+
#### **Deploy Gateway and Virtual Service for BookInfo app**
163146

164147
```sh
165148
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
166149
```
167150

168151
<hr />
169-
<br />
170152

171153
<h3>
172154
<a name="manual-sidecar-inj" />
@@ -183,7 +165,7 @@ curl https://raw.githubusercontent.com/istio/istio/master/samples/bookinfo/platf
183165

184166
Observing the new yaml file reveals that additional container Istio Proxy has been added to the Pods with necessary configurations:
185167

186-
```
168+
```yaml
187169
image: docker.io/istio/proxyv2:1.3.0
188170
imagePullPolicy: IfNotPresent
189171
name: istio-proxy

content/learning-paths/11111111-1111-1111-1111-111111111111/mastering-service-meshes-for-developers/advance-concepts-of-service-meshes/expose-services.md

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@ id: "expose-services"
1111
{{< chapterstyle >}}
1212
The components deployed on the service mesh by default are not exposed outside the cluster. An Ingress Gateway is deployed as a Kubernetes service of type LoadBalancer (or NodePort). To make Bookinfo accessible external to the cluster, you have to create an `Istio Gateway` for the Bookinfo application and also define an `Istio VirtualService` with the routes we need.
1313

14-
<br />
15-
<br />
14+
### **Inspecting the Istio Ingress Gateway**
1615

17-
<h2 class="chapter-sub-heading"> Inspecting the Istio Ingress Gateway</h2>
1816

19-
<br />
2017
The ingress gateway gets exposed as a normal Kubernetes service of type LoadBalancer (or NodePort):
2118

2219
```sh
@@ -61,10 +58,9 @@ Now let us find the ingress pod and output the log:
6158
kubectl logs istio-ingressgateway-... -n istio-system
6259
```
6360

64-
<h2 class="chapter-sub-heading">View Istio Ingress Gateway for Bookinfo</h2>
65-
<br />
61+
### **View Istio Ingress Gateway for Bookinfo**
6662

67-
<h3 class="chapter-sub-heading"> View the Gateway and VirtualServices</h3>
63+
#### **View the Gateway and VirtualServices**
6864

6965
Check the created `Istio Gateway` and `Istio VirtualService` to see the changes deployed:
7066

@@ -76,9 +72,8 @@ kubectl get virtualservices
7672
kubectl get virtualservices -o yaml
7773
```
7874

79-
<h3 class="chapter-sub-heading">
80-
Find the external port of the Istio Ingress Gateway by running:
81-
</h3>
75+
#### **Find the external port of the Istio Ingress Gateway by running:**
76+
8277

8378
```sh
8479
kubectl get service istio-ingressgateway -n istio-system -o wide
@@ -90,7 +85,7 @@ To just get the first port of istio-ingressgateway service, we can run this:
9085
kubectl get service istio-ingressgateway -n istio-system --template='{{(index .spec.ports 1).nodePort}}'
9186
```
9287

93-
<h3 class="chapter-sub-heading"> Create a DNS entry:</h3>
88+
#### **Create a DNS entry:**
9489

9590
Modify your local `/etc/hosts` file to add an entry for your sample application.
9691

@@ -106,7 +101,7 @@ echo "http://$(kubectl get nodes --selector=kubernetes.io/role!=master -o jsonpa
106101

107102
Docker Desktop users please use `http://localhost/productpage` to access product page in your browser.
108103

109-
<h2 class="chapter-sub-heading"> Apply default destination rules</h2>
104+
### **Apply default destination rules**
110105

111106
Before we start playing with Istio's traffic management capabilities we need to define the available versions of the deployed services. They are called subsets, in destination rules.
112107

@@ -187,16 +182,16 @@ kubectl get destinationrules
187182
kubectl get destinationrules -o yaml
188183
```
189184

190-
<h2 class="chapter-sub-heading"> Browse to BookInfo</h2>
185+
### **Browse to BookInfo**
191186

192187
Browse to the website of the Bookinfo. To view the product page, you will have to append
193188
`/productpage` to the url.
194189

195-
<h3 class="chapter-sub-heading"> Reload Page</h3>
190+
#### **Reload Page**
196191

197192
Now, reload the page multiple times and notice how it round robins between v1, v2 and v3 of the reviews service.
198193

199-
<h2 class="chapter-sub-heading">Inspect the Istio proxy of the productpage pod</h2>
194+
###Inspect the Istio proxy of the productpage pod
200195

201196
To better understand the istio proxy, let's inspect the details. Let us `exec` into the productpage pod to find the proxy details. To do so we need to first find the full pod name and then `exec` into the istio-proxy container:
202197

@@ -221,24 +216,21 @@ As a last step, lets exit the container:
221216
exit
222217
```
223218

224-
<br />
225-
<h3>Alternative: Manual installation</h3>
219+
### **Alternative: Manual installation**
220+
226221
Follow this if the above steps did not work for you
227222

228-
<br />
229-
<br />
230223

231-
<h4 class="chapter-alt-heading"> Default destination rules</h4>
224+
##### **Default destination rules**
232225

233226
Run the following command to create default destination rules for the Bookinfo services:
234227

235228
```sh
236229
kubectl apply -f samples/bookinfo/networking/destination-rule-all-mtls.yaml
237230
```
238231

239-
<h4 class="chapter-alt-heading">
240-
Configure the Bookinfo route with the Istio Ingress gateway
241-
</h4>
232+
##### **Configure the Bookinfo route with the Istio Ingress gateway**
233+
242234

243235
We can create a virtualservice & gateway for bookinfo app in the ingress gateway by running the following:
244236

content/learning-paths/11111111-1111-1111-1111-111111111111/mastering-service-meshes-for-developers/advance-concepts-of-service-meshes/getting-started.md

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ title: "Getting Started with Istio"
1010

1111
{{< chapterstyle >}}
1212

13-
<h2 class="chapter-sub-heading">Setup Istio </h2>
13+
### **Setup Istio**
1414

1515
Now that we have a Kubernetes cluster and Meshery, we are ready to download and deploy Istio resources.
1616

17-
<h2 class="chapter-sub-heading">Steps</h2>
17+
### **Steps**
1818

1919
1. [Install Istio](#1)
2020
1. [Verify install](#2)
@@ -25,9 +25,8 @@ Optional (manual install of Istio):
2525
1. [Setup `istioctl`](#1.2)
2626
1. [Install istio](#1.3)
2727

28-
<h3 class="chapter-sub-heading">
29-
<a name="1">Install Istio</a>
30-
</h3>
28+
#### **Install Istio**
29+
3130

3231
Using Meshery, select `Istio` from the `Management` menu.
3332

@@ -36,15 +35,10 @@ In the Istio management page:
3635
1. Type `istio-system` into the namespace field.
3736
1. Click the (+) icon on the `Install` card and select `Latest Istio` to install the latest version of Istio.
3837

39-
<h3>Alternative:Manual installation</h3>
38+
#### **Alternative:Manual installation**
4039
Perform the below steps if the above steps doesn't work for you.
4140

42-
<br />
43-
<br />
44-
45-
<h4 class="chapter-alt-heading">
46-
<a name="1.1">Download Istio</a>
47-
</h4>
41+
#### **Download Istio**
4842

4943
You will download and deploy the latest Istio resources on your Kubernetes cluster.
5044

@@ -55,10 +49,7 @@ On your local machine, execute:
5549
```sh
5650
curl -L https://git.io/getLatestIstio | ISTIO_VERSION=1.7.3 sh -
5751
```
58-
59-
<h4 class="chapter-alt-heading">
60-
<a name="1.2">Setting up istioctl</a>
61-
</h4>
52+
#### **Setting up istioctl**
6253

6354
On a \*nix system, you can setup `istioctl` by doing the following:
6455

@@ -85,9 +76,7 @@ Check if the cluster is ready for installation:
8576
istioctl verify-install
8677
```
8778

88-
<h4 class="chapter-alt-heading">
89-
<a name="1.3">Install Istio</a>
90-
</h4>
79+
##### **Install Istio**
9180

9281
To install Istio with a `demo` profile, execute the below command.
9382

@@ -101,16 +90,14 @@ Alternatively, with Envoy logging enabled:
10190
istioctl install --set profile=demo --set meshConfig.accessLogFile=/dev/stdout
10291
```
10392

104-
<h3 class="chapter-sub-heading">
105-
<a name="2">Verify install</a>
106-
</h3>
93+
#### **Verify install**
10794

10895
In the Istio management page:
10996

11097
1. Click the (+) icon on the `Validate Service Mesh Configuration` card.
11198
1. Select `Verify Installation` to verify the installation of Istio.
11299

113-
<h4 class="chapter-alt-heading">Alternatively:</h4>
100+
#### **Alternatively:**
114101

115102
Istio is deployed in a separate Kubernetes namespace `istio-system`. To check if Istio is deployed, and also, to see all the pieces that are deployed, execute the following:
116103

0 commit comments

Comments
 (0)