Skip to content

Commit 639f103

Browse files
Istio addon - Address comments
1 parent 82787e1 commit 639f103

File tree

3 files changed

+299
-281
lines changed

3 files changed

+299
-281
lines changed

articles/aks/istio-about.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ ms.author: shasb
88

99
# Istio based service mesh add-on for Azure Kubernetes Service (preview)
1010

11-
[Istio][istio-overview] addresses the challenges developers and operators face with a distributed or microservices architecture. The Istio based service mesh add-on provides an officially supported and tested integration for Azure Kubernetes Service (AKS).
11+
[Istio][istio-overview] addresses the challenges developers and operators face with a distributed or microservices architecture. The Istio-based service mesh add-on provides an officially supported and tested integration for Azure Kubernetes Service (AKS).
1212

1313
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
1414

1515
## What is a Service Mesh?
1616

1717
Modern applications are typically architected as distributed collections of microservices, with each collection of microservices performing some discrete business function. A service mesh is a dedicated infrastructure layer that you can add to your applications. It allows you to transparently add capabilities like observability, traffic management, and security, without adding them to your own code. The term **service mesh** describes both the type of software you use to implement this pattern, and the security or network domain that is created when you use that software.
1818

19-
As the deployment of distributed services, such as in a Kubernetes-based system, grows in size and complexity, it can become harder to understand and manage. Its requirements can include discovery, load balancing, failure recovery, metrics, and monitoring. A service mesh also often addresses more complex operational requirements like A/B testing, canary deployments, rate limiting, access control, encryption, and end-to-end authentication.
19+
As you deploy distributed services and that system grows in complexity and size, it can become harder to understand and manage. You may need to implement capabilities such as discovery, load balancing, failure recovery, metrics, and monitoring. A service mesh can also address more complex operational requirements like A/B testing, canary deployments, rate limiting, access control, encryption, and end-to-end authentication.
2020

2121
Service-to-service communication is what makes a distributed application possible. Routing this communication, both within and across application clusters, becomes increasingly complex as the number of services grow. Istio helps reduce this complexity while easing the strain on development teams.
2222

2323
## What is Istio?
2424

25-
Istio is an open source service mesh that layers transparently onto existing distributed applications. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services. Istio is the path to load balancing, service-to-service authentication, and monitoring – with few or no service code changes. Its powerful control plane brings vital features, including:
25+
Istio is an open source service mesh that layers transparently onto existing distributed applications. Istio’s powerful features provide a uniform and more efficient way to secure, connect, and monitor services. Istio enables load balancing, service-to-service authentication, and monitoring – with few or no service code changes. Its powerful control plane brings vital features, including:
2626

2727
* Secure service-to-service communication in a cluster with TLS encryption, strong identity-based authentication and authorization
2828
* Automatic load balancing for HTTP, gRPC, WebSocket, and TCP traffic
@@ -32,10 +32,11 @@ Istio is an open source service mesh that layers transparently onto existing dis
3232

3333
## How is the add-on different from open source Istio?
3434

35-
This service mesh add-on uses and builds on top of open-source Istio. The add-on flavor provides the following extra benefits:
35+
This service mesh add-on uses and builds on top of open source Istio. The add-on flavor provides the following extra benefits:
3636

3737
* Istio versions are tested and verified to be compatible with supported versions of Azure Kubernetes Service.
3838
* Scaling of Istio control plane configured and handled by Microsoft.
39+
* Adjust configuration of AKS components like `coredns` when Istio is enabled.
3940
* Verified external and internal ingress set-up.
4041
* Verified to work with [Azure Monitor managed service for Prometheus][managed-prometheus-overview] and [Azure Managed Grafana][managed-grafana-overview].
4142
* Official Azure support provided for the add-on.

articles/aks/istio-deploy-addon.md

Lines changed: 138 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -9,58 +9,62 @@ ms.author: shasb
99

1010
# Deploy Istio based service mesh add-on for Azure Kubernetes Service (preview)
1111

12-
This article shows you how to install the Istio based service mesh add-on for Azure Kubernetes Service (AKS) cluster.
12+
This article shows you how to install the Istio-based service mesh add-on for Azure Kubernetes Service (AKS) cluster.
1313

14-
A conceptual overview of Istio and the service mesh add-on is available [here][istio-about].
14+
For more details on Istio and the service mesh add-on, see [Istio based service mesh add-on for Azure Kubernetes Service][istio-about].
1515

16-
[!INCLUDE [preview features callout](./includes/preview/preview-callout.md)]
16+
## Before you begin
1717

18-
## Prerequisites
18+
You need the Azure CLI version 2.44.0 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
1919

20-
* An Azure subscription. If you don't have an Azure subscription, you can create a [free account](https://azure.microsoft.com/free).
21-
* [Azure CLI][azure-cli-install] and the CLI extension `aks-preview` of version >= 0.5.135 are installed.
20+
Set environment variables:
2221

23-
* If `aks-preview` isn't already installed, run the following command:
22+
```bash
23+
export CLUSTER=<cluster-name>
24+
export RESOURCE_GROUP=<resource-group-name>
25+
export LOCATION=<location>
26+
```
2427

25-
```azurecli
26-
az extension add --name aks-preview
27-
```
28+
## Install the aks-preview Azure CLI extension
2829

29-
* If `aks-preview` is already installed, run the following command to update it to the latest version:
30+
You need the `aks-preview` Azure CLI extension of version 0.5.133 or later installed and configured. Run `az --version` to find the version.
3031

31-
```azurecli
32-
az extension update --name aks-preview
33-
```
32+
[!INCLUDE [preview features callout](includes/preview/preview-callout.md)]
3433

35-
* Register the `AzureServiceMeshPreview` feature flag by using the [az feature register][az-feature-register] command:
34+
To install the aks-preview extension, run the following command:
3635

37-
```azurecli
38-
az feature register --namespace "Microsoft.ContainerService" --name "AzureServiceMeshPreview"
39-
```
36+
```azurecli
37+
az extension add --name aks-preview
38+
```
4039

41-
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
40+
Run the following command to update to the latest version of the extension released:
4241

43-
```azurecli
44-
az feature show --namespace "Microsoft.ContainerService" --name "AzureServiceMeshPreview"
45-
```
42+
```azurecli
43+
az extension update --name aks-preview
44+
```
4645

47-
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
46+
## Register the 'AzureServiceMeshPreview' feature flag
4847

49-
```azurecli-interactive
50-
az provider register --namespace Microsoft.ContainerService
51-
```
48+
Register the `AzureServiceMeshPreview` feature flag by using the [az feature register][az-feature-register] command, as shown in the following example:
5249

53-
* Set environment variables:
50+
```azurecli-interactive
51+
az feature register --namespace "Microsoft.ContainerService" --name "AzureServiceMeshPreview"
52+
```
5453

55-
```bash
56-
export CLUSTER=<cluster-name>
57-
export RESOURCE_GROUP=<resource-group-name>
58-
export LOCATION=<location>
59-
```
54+
It takes a few minutes for the status to show *Registered*. Verify the registration status by using the [az feature show][az-feature-show] command:
6055

61-
## Install the Istio add-on on your cluster
56+
```azurecli-interactive
57+
az feature show --namespace "Microsoft.ContainerService" --name "AzureServiceMeshPreview"
58+
```
59+
60+
When the status reflects *Registered*, refresh the registration of the *Microsoft.ContainerService* resource provider by using the [az provider register][az-provider-register] command:
61+
62+
```azurecli-interactive
63+
az provider register --namespace Microsoft.ContainerService
64+
```
65+
66+
## Install Istio add-on at the time of cluster creation
6267

63-
**Install add-on at the time of cluster creation:**
6468
To install the Istio add-on when creating the cluster, use `--enable-asm` or `--enable-azure-service-mesh` parameters.
6569

6670
```azurecli-interactive
@@ -72,52 +76,51 @@ az aks create \
7276
--enable-asm
7377
```
7478

75-
**Install add-on for existing cluster:**
79+
## Install Istio add-on for existing cluster
7680

7781
The following example enables Istio add-on for an existing AKS cluster:
7882

79-
```azurecli-interactive
80-
az aks mesh enable --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
81-
```
82-
8383
> [!IMPORTANT]
8484
> You can't enable the Istio add-on on an existing cluster if an OSM add-on is already on your cluster. [Uninstall OSM add-on on your cluster][uninstall-osm-addon] before enabling the Istio add-on.
85-
> You can't enable the Istio add-on on an existing cluster if Istio was already installed outside the add-on installation. [Uninstall non-add-on Istio][uninstall-istio-oss] before enabling the Istio add-on.
86-
> Istio add-on can only be enabled on AKS clusters of version >= 1.23
85+
> You can't enable the Istio add-on on an existing cluster if an OSM add-on is already on your cluster. Uninstall the OSM add-on before installing the Istio add-on. For more details, see [Uninstall the OSM add-on from your AKS cluster][uninstall-osm-addon].
86+
> Istio add-on can only be enabled on AKS clusters of version >= 1.23.
8787
88+
```azurecli-interactive
89+
az aks mesh enable --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
90+
```
8891

8992
## Verify add-on was installed successfully
9093

91-
1. To see if the Istio add-on is installed on your cluster, run the following command:
94+
To verify the Istio add-on is installed on your cluster, run the following command:
9295

93-
```azurecli-interactive
94-
az aks show --resource-group ${RESOURCE_GROUP} --name ${CLUSTER} --query 'serviceMeshProfile.mode'
95-
```
96+
```azurecli-interactive
97+
az aks show --resource-group ${RESOURCE_GROUP} --name ${CLUSTER} --query 'serviceMeshProfile.mode'
98+
```
9699

97-
**Expected response:**
100+
Confirm the output shows Istio, for example:
98101

99-
```
100-
Istio
101-
```
102+
```
103+
Istio
104+
```
102105

103-
1. Get the credentials for your AKS cluster:
106+
Use `az aks get-credentials` to the credentials for your AKS cluster:
104107

105-
```azurecli-interactive
106-
az aks get-credentials --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
107-
```
108+
```azurecli-interactive
109+
az aks get-credentials --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
110+
```
108111

109-
1. Verify that `istiod` (Istio control plane) pods are running successfully:
112+
Use `kubectl` to verify that `istiod` (Istio control plane) pods are running successfully:
110113

111-
```bash
112-
kubectl get pods -n aks-istio-system
113-
```
114+
```bash
115+
kubectl get pods -n aks-istio-system
116+
```
114117

115-
**Expected response:**
118+
Confirm the `istiod` pod has a status of `Running`. For example:
116119

117-
```
118-
NAME READY STATUS RESTARTS AGE
119-
istiod-asm-1-17-74f7f7c46c-xfdtl 1/1 Running 0 2m
120-
```
120+
```
121+
NAME READY STATUS RESTARTS AGE
122+
istiod-asm-1-17-74f7f7c46c-xfdtl 2/2 Running 0 2m
123+
```
121124

122125
## Enable sidecar injection
123126

@@ -127,78 +130,91 @@ To automatically install sidecar to any new pods, annotate your namespaces:
127130
kubectl label namespace default istio.io/rev=asm-1-17
128131
```
129132

133+
> [!IMPORTANT]
134+
> The default `istio-injection=enabled` labeling doesn't work. Explicit versioning (`istio.io/rev=asm-1-17`) is required.
135+
130136
## Deploy sample application
131137

132-
1. Deploy sample application on the cluster:
133-
134-
```bash
135-
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/platform/kube/bookinfo.yaml
136-
```
137-
138-
**Expected response:**
139-
140-
```
141-
service/details created
142-
serviceaccount/bookinfo-details created
143-
deployment.apps/details-v1 created
144-
service/ratings created
145-
serviceaccount/bookinfo-ratings created
146-
deployment.apps/ratings-v1 created
147-
service/reviews created
148-
serviceaccount/bookinfo-reviews created
149-
deployment.apps/reviews-v1 created
150-
deployment.apps/reviews-v2 created
151-
deployment.apps/reviews-v3 created
152-
service/productpage created
153-
serviceaccount/bookinfo-productpage created
154-
deployment.apps/productpage-v1 created
155-
```
156-
157-
1. Verify that the pods and services were created successfully:
158-
159-
```bash
160-
kubectl get services
161-
```
162-
163-
**Expected response:**
164-
165-
```
166-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
167-
details ClusterIP 10.0.180.193 <none> 9080/TCP 87s
168-
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 15m
169-
productpage ClusterIP 10.0.112.238 <none> 9080/TCP 86s
170-
ratings ClusterIP 10.0.15.201 <none> 9080/TCP 86s
171-
reviews ClusterIP 10.0.73.95 <none> 9080/TCP 86s
172-
```
173-
174-
```bash
175-
kubectl get pods
176-
```
177-
178-
**Expected response:**
179-
180-
```
181-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
182-
details-v1-558b8b4b76-2llld 2/2 Running 0 2m41s
183-
productpage-v1-6987489c74-lpkgl 2/2 Running 0 2m40s
184-
ratings-v1-7dc98c7588-vzftc 2/2 Running 0 2m41s
185-
reviews-v1-7f99cc4496-gdxfn 2/2 Running 0 2m41s
186-
reviews-v2-7d79d5bd5d-8zzqd 2/2 Running 0 2m41s
187-
reviews-v3-7dbcdcbc56-m8dph 2/2 Running 0 2m41s
188-
```
189-
190-
Expect to see each pod ready with two containers, one of which is the envoy sidecar injected by Istio.
138+
Use `kubectl apply` to deploy sample application on the cluster:
139+
140+
```bash
141+
kubectl apply -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/platform/kube/bookinfo.yaml
142+
```
143+
144+
Confirm several deployments and services are created on your cluster. For example:
145+
146+
```
147+
service/details created
148+
serviceaccount/bookinfo-details created
149+
deployment.apps/details-v1 created
150+
service/ratings created
151+
serviceaccount/bookinfo-ratings created
152+
deployment.apps/ratings-v1 created
153+
service/reviews created
154+
serviceaccount/bookinfo-reviews created
155+
deployment.apps/reviews-v1 created
156+
deployment.apps/reviews-v2 created
157+
deployment.apps/reviews-v3 created
158+
service/productpage created
159+
serviceaccount/bookinfo-productpage created
160+
deployment.apps/productpage-v1 created
161+
```
162+
163+
Use `kubectl get services` to verify that the services were created successfully:
164+
165+
```bash
166+
kubectl get services
167+
```
168+
169+
Confirm the following services were deployed:
170+
171+
```
172+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
173+
details ClusterIP 10.0.180.193 <none> 9080/TCP 87s
174+
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 15m
175+
productpage ClusterIP 10.0.112.238 <none> 9080/TCP 86s
176+
ratings ClusterIP 10.0.15.201 <none> 9080/TCP 86s
177+
reviews ClusterIP 10.0.73.95 <none> 9080/TCP 86s
178+
```
179+
180+
```bash
181+
kubectl get pods
182+
```
183+
184+
Confirm that all the pods have status of `Running`.
185+
186+
```
187+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
188+
details-v1-558b8b4b76-2llld 2/2 Running 0 2m41s
189+
productpage-v1-6987489c74-lpkgl 2/2 Running 0 2m40s
190+
ratings-v1-7dc98c7588-vzftc 2/2 Running 0 2m41s
191+
reviews-v1-7f99cc4496-gdxfn 2/2 Running 0 2m41s
192+
reviews-v2-7d79d5bd5d-8zzqd 2/2 Running 0 2m41s
193+
reviews-v3-7dbcdcbc56-m8dph 2/2 Running 0 2m41s
194+
```
195+
196+
> [!NOTE]
197+
> Each pod has two containers, one of which is the envoy sidecar injected by Istio and the other is the application container.
191198
192199

193200
## Delete resources
194201

202+
Use `kubectl delete` to delete the sample application:
203+
204+
```bash
205+
kubectl delete -f https://raw.githubusercontent.com/istio/istio/release-1.17/samples/bookinfo/platform/kube/bookinfo.yaml
206+
```
207+
195208
If you don't intend to enable Istio ingress on your cluster and want to disable the Istio add-on, run the following command:
196209

197210
```azurecli-interactive
198211
az aks mesh disable --resource-group ${RESOURCE_GROUP} --name ${CLUSTER}
199212
```
200213

201-
If you want to clean up all the resources created from this document, run the following command:
214+
> [!CAUTION]
215+
> Disabling the service mesh addon will completely remove the Istio control plane from the cluster.
216+
217+
Use `az group delete` to delete your cluster and the associated resources. For example:
202218

203219
```azurecli-interactive
204220
az group delete --name ${RESOURCE_GROUP} --yes --no-wait

0 commit comments

Comments
 (0)