You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2019. It is now read-only.
-[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)
-[[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
+
2
16
3
17
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).
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).
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.
6
11
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.
8
13
14
+
## Preparations
9
15
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
11
17
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.
12
19
13
20
Open `kubernetes-manifests/vote/service.yaml` and change the service type from `LoadBalancer` to `ClusterIP`:
14
21
15
-
```
22
+
```YAML
16
23
apiVersion: v1
17
24
kind: Service
18
25
metadata:
@@ -33,21 +40,22 @@ metadata:
33
40
labels:
34
41
app: azure-voting-app
35
42
spec:
36
-
type: ClusterIP <<<< Changed from LoadBalancer to ClusterIP
43
+
type: ClusterIP
37
44
ports:
38
45
- port: 80
39
46
selector:
40
47
app: azure-voting-app
41
48
component: azure-voting-app-front
42
49
```
43
50
44
-
Then, re-deploy it using `kubectl apply`
51
+
Re-deploy `azure-voting-app-front` service like this:
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`:
77
76
```sh
78
77
$ kubectl edit svc azure-voting-app-front
79
78
```
@@ -86,20 +85,19 @@ spec:
86
85
clusterIP: 10.0.20.143
87
86
externalTrafficPolicy: Cluster
88
87
ports:
89
-
- nodePort: 30506 <<<< remove nodePort line
88
+
- nodePort: 30506 <<<< remove nodePort line
90
89
port: 80
91
90
protocol: TCP
92
91
targetPort: 80
93
92
selector:
94
93
app: azure-voting-app
95
94
component: azure-voting-app-front
96
95
sessionAffinity: None
97
-
type: LoadBalancer <<<< Change from LoadBalancer to ClusterIP
96
+
type: LoadBalancer <<<< Change from LoadBalancer to ClusterIP
98
97
status:
99
98
...
100
99
```
101
-
102
-
After your modification, it should be like this:
100
+
> After your modification, it should be like this:
103
101
```yaml
104
102
apiVersion: v1
105
103
kind: Service
@@ -121,10 +119,12 @@ status:
121
119
...
122
120
```
123
121
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).
124
125
125
-
## Create ingress resource
126
126
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.
128
128
129
129

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

172
172
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.
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.
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)
0 commit comments