Skip to content

Commit 43369a9

Browse files
authored
Merge pull request #120 from MicrosoftCloudEssentials-LearningHub/containers-aks-k8s
Add migration overview from multi-container Web Apps to AKS
2 parents 16be4bf + f5a397b commit 43369a9

File tree

1 file changed

+235
-0
lines changed

1 file changed

+235
-0
lines changed
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
# Migrating from <br/> Multi-container Web Apps to AKS - Overview
2+
3+
Costa Rica
4+
5+
[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com)
6+
[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/)
7+
[brown9804](https://github.com/brown9804)
8+
9+
Last updated: 2025-10-23
10+
11+
----------
12+
13+
<details>
14+
<summary><b>List of References</b> (Click to expand)</summary>
15+
16+
- [Choose an Azure compute service (Decision Tree)](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree)
17+
- [Free, Standard, and Premium pricing tiers for Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/free-standard-pricing-tiers)
18+
- [AKS long-term support](https://learn.microsoft.com/en-us/azure/aks/long-term-support)
19+
- [AKS pricing details](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/)
20+
- [Azure Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/)
21+
- [Azure managed disk types](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types)
22+
- [Disk type comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types#disk-type-comparison)
23+
- [Microsoft Sales and Support](https://support.microsoft.com/contactus?ContactUsExperienceEntryPointAssetId=S.HP.SMC-HOME)
24+
- [Microsoft Copilot in Azure (VM sizing demo video)](https://www.youtube.com/watch?v=HGdhUFHnij4&t=819s)
25+
26+
</details>
27+
28+
<details>
29+
<summary><b>Table of Content</b> (Click to expand)</summary>
30+
31+
- [Overview](#overview)
32+
- [Container related services](#container-related-services)
33+
- [How to choose?](#how-to-choose)
34+
- [Pricing example](#pricing-example)
35+
- [Best practices](#best-practices)
36+
37+
</details>
38+
39+
> [!NOTE]
40+
> If you have any questions or need further clarification, please reach out to your Microsoft account team or contact Microsoft directly: [Microsoft Sales and Support](https://support.microsoft.com/contactus?ContactUsExperienceEntryPointAssetId=S.HP.SMC-HOME) for additional support and guidance, or
41+
42+
| Component | Role |
43+
| --- | --- |
44+
| Containers | Lightweight, `portable units that package code, dependencies, and runtime together`. |
45+
| Docker | Tool that `builds and runs these containers locally`. It lets you define`multi-container setups using docker-compose.` |
46+
| Docker Compose | Manages multiple containers on one host |
47+
| Kubernetes (K8s) | Orchestrates containers across many hosts (nodes) |
48+
| AKS | Azure’s managed Kubernetes `handles infrastructure, scaling, and updates for you` |
49+
50+
## Overview
51+
52+
`Monolithic → Microservices → Containerization → Orchestration` This progression improves scalability, resilience, and agility for modern cloud-native applications.
53+
54+
<div align="center">
55+
<img width="778" height="369" alt="image" src="https://github.com/user-attachments/assets/23f6e6e9-1c37-47f5-afae-e5fcdf847d93" />
56+
</div>
57+
58+
> - `Monolithic Application`: A single, large application that contains all components (Recruitment Website, Job Application, Job Vacancies, Recruiters, etc) bundled together.
59+
> - The modules really rely on each other quite a bit.
60+
> - It's tricky to scale features on their own.
61+
> - Any updates mean we have to redeploy the whole app.
62+
> - `Transition to Microservices`: The monolithic app is split into smaller, independent services (Recruiters, Job Application, Job Vacancies).
63+
> - Each service can be developed, deployed, and scaled independently.
64+
> - Easier to maintain and adopt new technologies per service.
65+
> - `Docker`: Each microservice is packaged into application containers using Docker.
66+
> - Provides portability across environments.
67+
> - Ensures consistency between development and production.
68+
> - `Kubernetes`: Containers are deployed and managed in a Kubernetes cluster (K8s).
69+
> - Handles orchestration: scaling, load balancing, self-healing.
70+
> - Enables automated deployments and rolling updates.
71+
72+
## Container related services
73+
74+
> Typical Flow:
75+
76+
1. **Build image → Push to ACR**
77+
2. **Choose deployment service:**
78+
* AKS (more flexible orchestration)
79+
* Container Apps (simpler, serverless)
80+
* ACI (quick jobs)
81+
3. **Add storage if needed**
82+
4. **Configure networking, scaling, monitoring**
83+
84+
<div align="center">
85+
<img width="750" height="677" alt="image" src="https://github.com/user-attachments/assets/400f5be2-45c2-4486-9c53-adf739aff4d0" />
86+
</div>
87+
88+
<details>
89+
<summary><b> 1. Azure Container Registry (ACR)</b> (Click to expand)</summary>
90+
91+
> This is where you store your container images (like Docker images). Think of it as your private container image repository.
92+
> - **When to use:** Almost always if you’re deploying containers in Azure. You build your app locally or in CI/CD, push the image to ACR, and then other services (AKS, Container Apps, etc.) pull from it.
93+
> - **Setup order:** Usually first, because your deployment services need access to the images.
94+
95+
</details>
96+
97+
<details>
98+
<summary><b>2. Azure Kubernetes Service (AKS)</b> (Click to expand)</summary>
99+
100+
> A managed Kubernetes cluster for running containerized workloads at scale.
101+
> - **When to use:** If you need orchestration, scaling, and advanced networking for multiple containers or microservices.
102+
> - **Relation to ACR:** AKS pulls images from ACR to run your pods.
103+
> - **Setup order:** After ACR is ready and your images are pushed.
104+
105+
</details>
106+
107+
<details>
108+
<summary><b>3. Azure Container Apps</b> (Click to expand)</summary>
109+
110+
> A serverless container platform for microservices and apps without managing Kubernetes directly.
111+
> - **When to use:** If you want simplicity from management perspective and autoscaling.
112+
> - **Relation to ACR:** Same as AKS, pulls images from ACR.
113+
> - **Setup order:** After ACR.
114+
115+
</details>
116+
117+
<details>
118+
<summary><b>4. Azure Container Instances (ACI)</b> (Click to expand)</summary>
119+
120+
> Run containers quickly without orchestration, good for short-lived tasks or simple apps.
121+
> - **When to use:** For lightweight workloads or batch jobs.
122+
> - **Relation to ACR:** Can also pull images from ACR.
123+
124+
</details>
125+
126+
<details>
127+
<summary><b>5. Azure Container Storage</b> (Click to expand)</summary>
128+
129+
> Persistent storage for stateful containers.
130+
> - **When to use:** If your containers need to keep data beyond their lifecycle (e.g., databases).
131+
> - **Setup order:** Alongside AKS or Container Apps if needed.
132+
133+
</details>
134+
135+
<details>
136+
<summary><b>6. Azure Kubernetes Service Edge Essentials</b> (Click to expand)</summary>
137+
138+
> On-premises Kubernetes for edge scenarios.
139+
> - **When to use:** If you need hybrid or edge deployments.
140+
141+
</details>
142+
143+
## How to choose?
144+
145+
<img width="900" height="916" alt="image" src="https://github.com/user-attachments/assets/259cba67-0742-4ff8-b9b5-4481772c04f9" />
146+
147+
From [Choose an Azure compute service](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree)
148+
149+
## Pricing example
150+
151+
> AKS `itself is free`; you pay for:
152+
> - VMs in Node Pools (Standard vs Premium SSD, VM size)
153+
> - Networking (Azure CNI vs Kubenet)
154+
> - Storage
155+
> - Optional features (e.g., Azure Monitor, Virtual Nodes)
156+
> Your `node VM size and features define cost and performance.`
157+
158+
How determine which **AKS tier** (or node size/configuration) you need, you can follow these steps:
159+
160+
> [!NOTE]
161+
> Quick Way to Decide:
162+
- If you want **low cost** → B-series or Spot VMs.
163+
- If you want **balanced performance** → D-series.
164+
- If you need **high compute** → F-series or GPU nodes.
165+
166+
1. Estimate Resource Requirements:
167+
- **CPU & Memory per container**: Check your app’s baseline usage.
168+
- **Number of containers per pod**: Multi-container apps share pod resources.
169+
- **Expected traffic**: Peak vs average load.
170+
2. Use AKS Recommendations:
171+
- Enable **Cluster Autoscaler** and **Horizontal Pod Autoscaler**.
172+
- Use **Azure Advisor** → It gives cost and performance recommendations based on telemetry.
173+
174+
> [!TIP]
175+
> Use [Azure Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/?msockid=38ec3806873362243e122ce086486339) and **AKS Sizing Guide**:
176+
177+
From AKS perspective we can choose between tier for the cluster management, click here for more details about [Free, Standard, and Premium pricing tiers for Azure Kubernetes Service (AKS) cluster management](https://learn.microsoft.com/en-us/azure/aks/free-standard-pricing-tiers)
178+
179+
| **Feature** | **Free Tier** | **Standard Tier** | **Premium Tier** |
180+
| --------------------- | -------------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
181+
| **When to Use** | - Experiment with AKS at no cost<br>- New to AKS/Kubernetes | - Production or mission-critical workloads needing high availability<br>- Financially backed SLA | - Mission-critical workloads requiring **two years** of Kubernetes version support<br>- Highest reliability |
182+
| **Supported Cluster Types** | - Dev/test clusters<br>- Clusters < 10 nodes | - Enterprise-grade or production workloads<br>- Up to 5,000 nodes | - Enterprise-grade or production workloads<br>- Up to 5,000 nodes |
183+
| **Pricing** | - Free cluster management<br>- Pay-as-you-go for resources | - Pay-as-you-go for resources<br>- [Standard tier cluster management pricing](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/) | - Pay-as-you-go for resources<br>- [Premium tier cluster management pricing](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/)|
184+
| **Feature Comparison** | - Recommended for clusters < 10 nodes<br>- Supports up to 1,000 nodes<br>- All AKS features | - Uptime SLA enabled<br>- Greater reliability<br>- Supports up to 5,000 nodes<br>- All AKS features | - Includes all Standard tier features<br>- [Microsoft maintenance past community support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) |
185+
186+
> [!TIP]
187+
> Which Tier Should You Choose?
188+
> - **Free Tier** → Best for **testing or learning**, small clusters (<10 nodes).
189+
> - **Standard Tier** → Best for **production workloads**, SLA-backed, up to 5,000 nodes.
190+
> - **Premium Tier** → Best for **mission-critical workloads**, extended Kubernetes version support (2 years), and advanced reliability.
191+
192+
<img width="1198" height="392" alt="image" src="https://github.com/user-attachments/assets/97244861-fd9c-476a-9a40-d90d49c18e0c" />
193+
194+
> [!NOTE]
195+
> Cost Impact as today (check last updated date):
196+
> - **Free Tier**: $0 for cluster management, pay for nodes only.
197+
> - **Standard Tier**: Adds cluster management cost (usually $0.10/hour per cluster).
198+
> - **Premium Tier**: Higher cluster management cost + advanced support.
199+
200+
E.g as today (check last updated date):
201+
202+
<img width="1410" height="977" alt="image" src="https://github.com/user-attachments/assets/6992a004-c148-44f2-9235-4f00b988f255" />
203+
204+
For VMs in Node Pools (Standard vs Premium SSD, VM size):
205+
206+
<img width="1217" height="972" alt="image" src="https://github.com/user-attachments/assets/accbab1c-4818-46db-ba5e-22dbc4a7b5ae" />
207+
208+
- You can use `Microsoft Copilot in Azure` to find the `best VM size for you`. Click here to see the [demo on how to use it](https://www.youtube.com/watch?v=HGdhUFHnij4&t=819s).
209+
- Copilot uses your `subscription details and resource availability to recommend the most suitable VM size.`
210+
- It can also `assist with quota checks and guide you to request more capacity if needed.`
211+
212+
<img width="1910" height="1003" alt="image" src="https://github.com/user-attachments/assets/6deae8de-410f-478f-9327-a5af8b296fa3" />
213+
214+
- And, Managed OS Disks in Azure are block-level storage volumes that are automatically managed by Azure for virtual machines. Click here to read more about [Azure managed disk types](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types)
215+
216+
<img width="1200" height="662" alt="image" src="https://github.com/user-attachments/assets/2d6773ce-45eb-4053-a1d1-791ab106d023" />
217+
218+
From [Disk type comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types#disk-type-comparison)
219+
220+
## Best practices
221+
222+
- Cluster Size & Node Pools
223+
- Use `Virtual Nodes or Burstable VMs (B-series) for cost efficiency.`
224+
- `Spot instances for non-critical workloads.`
225+
- Autoscaling: Enable `Cluster Autoscaler to scale nodes dynamically.`
226+
- Container Registry: Use Azure Container Registry `(ACR) with geo-replication only if needed.`
227+
- Networking Costs: Minimize cross-region traffic;` keep AKS and app services in same region.`
228+
- Reserved Instances: For predictable workloads, `reserve VMs for 1–3 years to save up to ~57%.`
229+
230+
<!-- START BADGE -->
231+
<div align="center">
232+
<img src="https://img.shields.io/badge/Total%20views-1443-limegreen" alt="Total views">
233+
<p>Refresh Date: 2025-09-05</p>
234+
</div>
235+
<!-- END BADGE -->

0 commit comments

Comments
 (0)