Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Commit 1c60303

Browse files
author
Yoichi Kawasaki
committed
Added TOC
1 parent 9e2ecf4 commit 1c60303

17 files changed

+171
-107
lines changed

labs/aks-100-setup-env.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# AKS100: Setup Lab environment
22

3+
Table of Contents
4+
<!-- TOC -->
5+
- [AKS100: Setup Lab environment](#aks100-setup-lab-environment)
6+
- [Open Azure Cloud Shell](#open-azure-cloud-shell)
7+
- [Verify Subscription](#verify-subscription)
8+
- [Register Azure Resource Providers](#register-azure-resource-providers)
9+
310
## Open Azure Cloud Shell
411

512
In this hands-on labs, you're running this workthrough on [Azure Cloud Shell Bash](https://docs.microsoft.com/en-us/azure/cloud-shell/overview).

labs/aks-101-create-aks-cluster.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# AKS101: Create Azure Kubernetes Service (AKS) Cluster
22

3+
Table of Content
4+
<!-- TOC -->
5+
- [AKS101: Create Azure Kubernetes Service (AKS) Cluster](#aks101-create-azure-kubernetes-service-aks-cluster)
6+
- [1. Create Resource Group](#1-create-resource-group)
7+
- [2. Create AKS Cluster](#2-create-aks-cluster)
8+
39
## 1. Create Resource Group
410
```sh
511
RESOURCE_GROUP="rg_azconlab" # Reousrce Group Name

labs/aks-102-acr.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
# Module AKS102: Azure Container Registry (ACR) and ACR Build
1+
# AKS102: Azure Container Registry (ACR) and ACR Build
2+
3+
Table of Contents
4+
<!-- TOC -->
5+
- [AKS102: Azure Container Registry (ACR) and ACR Build](#aks102-azure-container-registry-acr-and-acr-build)
6+
- [Create Azure Container Registry instance](#create-azure-container-registry-instance)
7+
- [Build Containers from Dockerfiles using ACR Build and host the images in ACR](#build-containers-from-dockerfiles-using-acr-build-and-host-the-images-in-acr)
8+
- [Clone the workshop repo into the cloud shell environment](#clone-the-workshop-repo-into-the-cloud-shell-environment)
9+
- [Build azure-vote-front container](#build-azure-vote-front-container)
10+
- [Build azure-vote-msyql container](#build-azure-vote-msyql-container)
11+
- [Check your repositories in ACR](#check-your-repositories-in-acr)
12+
- [Useful Links](#useful-links)
213

314
In this module, you will use Azure Container Registry (ACR) to build containers from Dockerfiles and also host your images to run in AKS
415

labs/aks-103-deploy-app.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1-
# Module AKS103: Deploy the Voting App to AKS Cluster
1+
# AKS103: Deploy the Voting App to AKS Cluster
2+
3+
Table of Content
4+
<!-- TOC -->
5+
- [AKS103: Deploy the Voting App to AKS Cluster](#aks103-deploy-the-voting-app-to-aks-cluster)
6+
- [Clone the Github repo (only if you haven't done yet)](#clone-the-github-repo-only-if-you-havent-done-yet)
7+
- [Review/Edit the YAML Config Files](#reviewedit-the-yaml-config-files)
8+
- [Deploy the Voting App to AKS Cluster](#deploy-the-voting-app-to-aks-cluster)
9+
- [Create ConfigMap](#create-configmap)
10+
- [Create Storage Resource](#create-storage-resource)
11+
- [Create Secret Resource](#create-secret-resource)
12+
- [[NOTE] How to check secret info in your Secret resource](#note-how-to-check-secret-info-in-your-secret-resource)
13+
- [Create Deployment](#create-deployment)
14+
- [Create Service](#create-service)
15+
216

317
In this module, you will deploy the voting app (below) to the AKS cluster that you created in the previous secion - [AKS101: Create Azure Kubernetes Services(AKS) Cluster](aks-101-create-aks-cluster.md).
418

@@ -239,4 +253,4 @@ echo $EXTERNALIP
239253
![](../assets/browse-app.png)
240254

241255
---
242-
[Top](../README.md) | [Back](aks-102-acr.md) | [Next](aks-104-ingress-top.md)
256+
[Top](../README.md) | [Back](aks-102-acr.md) | [Next](aks-104-ingress.md)

labs/aks-104-ingress-top.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

labs/ingress-01-http-application-routing.md renamed to labs/aks-104-ingress.md

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
# Ingress01: Setup HTTP Application Routing
1+
# AKS104: Ingress Controllers - HTTP application routing
22

3-
The HTTP application routing solution makes it easy to access applications that are deployed to your Azure Kubernetes Service (AKS) cluster. it configures an Ingress controller in your AKS cluster. As applications are deployed, the solution also creates publically accessible DNS names for application endpoints (it actually creates a DNS Zone in your subscription). In creating AKS cluster in the [aks-101 module](aks-101-create-aks-cluster.md), you already enabled the `HTTP application routing solution`. So you're ready to use the HTTP application routing. For more on HTTP application routing, please refer to [this](https://docs.microsoft.com/en-us/azure/aks/http-application-routing).
3+
<!-- TOC -->
4+
- [AKS104: Ingress Controllers - HTTP application routing](#aks104-ingress-controllers---http-application-routing)
5+
- [Preparations](#preparations)
6+
- [Setup HTTP Application Routing](#setup-http-application-routing)
7+
- [2. Application Gateway Ingress Controller](#2-application-gateway-ingress-controller)
8+
- [Extra labs - NGINX Ingress Controller](#extra-labs---nginx-ingress-controller)
49

5-
In this module, you configure the HTTP application routing which has been already deployed in an Azure Kubernetes Service (AKS) cluster, and make your app accessible via the the HTTP application routing.
10+
An ingress controller is a piece of software that provides reverse proxy, configurable traffic routing, and TLS termination for Kubernetes services. Kubernetes ingress resources are used to configure the ingress rules and routes for individual Kubernetes services. Using an ingress controller and ingress rules, a single IP address can be used to route traffic to multiple services in a Kubernetes cluster.
611

7-
## Change the application's service type from LoadBalancer to ClusterIP
12+
In this module, you configure the `HTTP application routing` and make your app accessible via the the HTTP application routing.
813

14+
## Preparations
915

10-
At this point, you can access the application endpoint with Global IP thanks to `LoadBalancer` that you've configured as the service type in `kubernetes-manifests/vote/service.yaml`. Here, you change the service type from `LoadBalancer` to `ClusterIP`. By changing the type to `ClousterIP`, you no longer can access the endpoint with Global IP but you can access within the cluster.
16+
> Change the application's service type from LoadBalancer to ClusterIP
1117
18+
At this point, you can access the application endpoint with Global IP as you've configured the application's service type as `LoadBalancer` in `kubernetes-manifests/vote/service.yaml`. In this part you change the service type from `LoadBalancer` to `ClusterIP`. By changing the type to `ClousterIP`, you no longer can access the endpoint with Global IP but you can access within the cluster.
1219

1320
Open `kubernetes-manifests/vote/service.yaml` and change the service type from `LoadBalancer` to `ClusterIP`:
1421

15-
```
22+
```YAML
1623
apiVersion: v1
1724
kind: Service
1825
metadata:
@@ -33,21 +40,22 @@ metadata:
3340
labels:
3441
app: azure-voting-app
3542
spec:
36-
type: ClusterIP <<<< Changed from LoadBalancer to ClusterIP
43+
type: ClusterIP
3744
ports:
3845
- port: 80
3946
selector:
4047
app: azure-voting-app
4148
component: azure-voting-app-front
4249
```
4350
44-
Then, re-deploy it using `kubectl apply`
51+
Re-deploy `azure-voting-app-front` service like this:
4552

4653
```sh
54+
$ kubectl delete svc azure-voting-app-front
4755
$ kubectl apply -f kubernetes-manifests/vote/service.yaml
4856
49-
service "azure-vote-back" created
50-
service "azure-vote-front" created
57+
service/azure-voting-app-back unchanged
58+
service/azure-voting-app-front created
5159
```
5260

5361
Check if `azure-vote-front` no longer have `EXTERNAL-IP` but only have `CLUSTER-IP`
@@ -61,19 +69,10 @@ azure-vote-front ClusterIP 10.0.118.224 <none> 80/TCP 2m
6169
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 10d
6270
```
6371

64-
### [Alternative Way to edit the service] - Directly edit the service by "kubeclt edit svc"
65-
66-
First of all, get the service name for the front app
67-
```sh
68-
$ kubectl get svc
69-
70-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
71-
azure-voting-app-back ClusterIP 10.0.129.1 <none> 3306/TCP 57m
72-
azure-voting-app-front LoadBalancer 10.0.20.143 13.78.11.43 80:30506/TCP 57m
73-
kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 18h
74-
```
7572

76-
Then, edit the services and change the service type from `LoadBalancer` to `ClusterIP`:
73+
> [Alternative Way]
74+
>
75+
> You can change service type by directly editing the service by "kubeclt edit svc". Here is how you ddit the services and change the service type from `LoadBalancer` to `ClusterIP`:
7776
```sh
7877
$ kubectl edit svc azure-voting-app-front
7978
```
@@ -86,20 +85,19 @@ spec:
8685
clusterIP: 10.0.20.143
8786
externalTrafficPolicy: Cluster
8887
ports:
89-
- nodePort: 30506 <<<< remove nodePort line
88+
- nodePort: 30506 <<<< remove nodePort line
9089
port: 80
9190
protocol: TCP
9291
targetPort: 80
9392
selector:
9493
app: azure-voting-app
9594
component: azure-voting-app-front
9695
sessionAffinity: None
97-
type: LoadBalancer <<<< Change from LoadBalancer to ClusterIP
96+
type: LoadBalancer <<<< Change from LoadBalancer to ClusterIP
9897
status:
9998
...
10099
```
101-
102-
After your modification, it should be like this:
100+
> After your modification, it should be like this:
103101
```yaml
104102
apiVersion: v1
105103
kind: Service
@@ -121,10 +119,12 @@ status:
121119
...
122120
```
123121

122+
## Setup HTTP Application Routing
123+
124+
The HTTP application routing solution makes it easy to access applications that are deployed to your Azure Kubernetes Service (AKS) cluster. it configures an Ingress controller in your AKS cluster. As applications are deployed, the solution also creates publically accessible DNS names for application endpoints (it actually creates a DNS Zone in your subscription). In creating AKS cluster in the [aks-101 module](aks-101-create-aks-cluster.md), you already enabled the `HTTP application routing solution`. So you're ready to use the HTTP application routing. For more on HTTP application routing, please refer to [this](https://docs.microsoft.com/en-us/azure/aks/http-application-routing).
124125

125-
## Create ingress resource
126126

127-
Browse to the auto-created AKS resource group named `MC_<ResourceGroup>_<ClusterName>_<region>` and select the DNS zone. Take note of the DNS zone name. This name is needed in next strep.
127+
First of all, browse to the auto-created AKS resource group named `MC_<ResourceGroup>_<ClusterName>_<region>` and select the DNS zone. Take note of the DNS zone name. This name is needed in next strep.
128128

129129
![](../assets/ingress-dns-name.png)
130130

@@ -170,5 +170,22 @@ Finally, you can access the app with the URL - `http://vote.<CLUSTER_SPECIFIC_DN
170170

171171
![](../assets/browse-app-ingress.png)
172172

173+
174+
## 2. Application Gateway Ingress Controller
175+
176+
In this section, you deploy the Application Gateway Ingress controller in your AKS cluster and make your app accessible via the the Ingress controller. Please make sure you have already done [preparations](#preparations) section above.
177+
178+
- https://github.com/Azure/application-gateway-kubernetes-ingress
179+
180+
181+
## Extra labs - NGINX Ingress Controller
182+
183+
To try `NGINX Ingress Controller`, see the following project pages:
184+
185+
- [NGINX ingress controller](https://github.com/kubernetes/ingress-nginx)
186+
- [How to deploy the NGINX ingress controller in AKS](https://docs.microsoft.com/en-us/azure/aks/ingress-basic)
187+
- [Helm CLI](https://docs.microsoft.com/en-us/azure/aks/kubernetes-helm)
188+
189+
173190
---
174-
[Ingress Top](aks-104-ingress-top.md)
191+
[Top](../README.md) | [Back](aks-103-deploy-app.md) | [Next](aks-105-scaleout.md)

labs/aks-105-scaleout.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
# Module AKS105: Manual Scale out Pods and Nodes
1+
# AKS105: Manual Scale out Pods and Nodes
2+
3+
Table of Content
4+
<!-- TOC -->
5+
- [AKS105: Manual Scale out Pods and Nodes](#aks105-manual-scale-out-pods-and-nodes)
6+
- [Manual Scale the number of Pods:](#manual-scale-the-number-of-pods)
7+
- [Manual Scale the number of Nodes:](#manual-scale-the-number-of-nodes)
28

39

410
## Manual Scale the number of Pods:
@@ -37,7 +43,7 @@ NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
3743
azure-voting-app-front 3 3 3 3 2h
3844
```
3945

40-
## [Manual] Scale the number of Nodes:
46+
## Manual Scale the number of Nodes:
4147

4248
First of all, check the # of node by running the following command:
4349

@@ -70,4 +76,4 @@ aks-nodepool1-40291275-3 Ready agent 21m v1.11.1
7076

7177

7278
---
73-
[Top](../README.md) | [Back](aks-104-ingress-top.md) | [Next](aks-106-statefulsets.md)
79+
[Top](../README.md) | [Back](aks-104-ingress.md) | [Next](aks-106-statefulsets.md)

labs/aks-106-statefulsets.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1-
# Module AKS106: Deploy Replicated MySQL Topology with Stateful Sets
1+
# AKS106: Deploy Replicated MySQL Topology with Stateful Sets
2+
3+
Table of Content
4+
<!-- TOC -->
5+
- [AKS106: Deploy Replicated MySQL Topology with Stateful Sets](#aks106-deploy-replicated-mysql-topology-with-stateful-sets)
6+
- [Deploy HA MySQL](#deploy-ha-mysql)
7+
- [Create StorageClass (Azure Disk)](#create-storageclass-azure-disk)
8+
- [Create ConfigMap](#create-configmap)
9+
- [Create Services](#create-services)
10+
- [Create StatefulSet](#create-statefulset)
11+
212

313
In this module, you will setup a replicated stateful MySQL HA cluster using a `StatefulSet` controller. It is a MySQL single-master topology with multiple slaves running asynchronous replication.
414

@@ -126,4 +136,4 @@ mysql 3 3 6m
126136

127137

128138
---
129-
[Top](../README.md) | [Back](aks-105-scaleout.md) | [Next](aks-107-monitoring-logging.md)
139+
[Top](../README.md) | [Back](aks-105-scaleout.md) | [Next](aks-107-container-insights.md)

labs/aks-107-container-insights.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# AKS107: Azure Monitor for Containers
2+
3+
## Enable monitoring using Azure CLI
4+
5+
```sh
6+
CLUSTER_NAME="myazconlabs"
7+
RESOURCE_GROUP="rg_azconlab"
8+
az aks enable-addons -a monitoring -n $CLUSTER_NAME -g $RESOURCE_GROUP
9+
10+
(output)
11+
provisioningState : Succeeded
12+
```
13+
14+
You can also enable the monitoring from either `Azure Portal`, `Azure Resource Manager Template`, or `Azure Monitor dashboard`.
15+
16+
For more detail, please see the following page:
17+
- [How to onboard Azure Monitor for containers](https://docs.microsoft.com/en-us/azure/monitoring/monitoring-container-insights-onboard)
18+
19+
## Monitor AKS with Azure Monitor for Container
20+
21+
- [Analyze AKS cluster performance with Azure Monitor for containers](https://docs.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-analyze)
22+
- [View container logs real time with Azure Monitor for containers](https://docs.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-live-logs)
23+
- [Setup Alert for performance problems](https://docs.microsoft.com/en-us/azure/azure-monitor/insights/container-insights-alerts)
24+
25+
26+
---
27+
[Top](../README.md) | [Back](aks-106-statefulsets.md) | [Next](aks-108-helm.md)

labs/aks-107-monitoring-top.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)