diff --git a/0_Azure/8_AzureApps/demos/1_fromMulti-containerWebApp_toAKS.md b/0_Azure/8_AzureApps/demos/1_fromMulti-containerWebApp_toAKS.md new file mode 100644 index 000000000..9603eb841 --- /dev/null +++ b/0_Azure/8_AzureApps/demos/1_fromMulti-containerWebApp_toAKS.md @@ -0,0 +1,235 @@ +# Migrating from
Multi-container Web Apps to AKS - Overview + +Costa Rica + +[![GitHub](https://badgen.net/badge/icon/github?icon=github&label)](https://github.com) +[![GitHub](https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff)](https://github.com/) +[brown9804](https://github.com/brown9804) + +Last updated: 2025-10-23 + +---------- + +
+List of References (Click to expand) + +- [Choose an Azure compute service (Decision Tree)](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree) +- [Free, Standard, and Premium pricing tiers for Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/free-standard-pricing-tiers) +- [AKS long-term support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) +- [AKS pricing details](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/) +- [Azure Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/) +- [Azure managed disk types](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types) +- [Disk type comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types#disk-type-comparison) +- [Microsoft Sales and Support](https://support.microsoft.com/contactus?ContactUsExperienceEntryPointAssetId=S.HP.SMC-HOME) +- [Microsoft Copilot in Azure (VM sizing demo video)](https://www.youtube.com/watch?v=HGdhUFHnij4&t=819s) + +
+ +
+Table of Content (Click to expand) + +- [Overview](#overview) +- [Container related services](#container-related-services) +- [How to choose?](#how-to-choose) +- [Pricing example](#pricing-example) +- [Best practices](#best-practices) + +
+ +> [!NOTE] +> 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 + +| Component | Role | +| --- | --- | +| Containers | Lightweight, `portable units that package code, dependencies, and runtime together`. | +| Docker | Tool that `builds and runs these containers locally`. It lets you define`multi-container setups using docker-compose.` | +| Docker Compose | Manages multiple containers on one host | +| Kubernetes (K8s) | Orchestrates containers across many hosts (nodes) | +| AKS | Azure’s managed Kubernetes `handles infrastructure, scaling, and updates for you` | + +## Overview + +`Monolithic → Microservices → Containerization → Orchestration` This progression improves scalability, resilience, and agility for modern cloud-native applications. + +
+ image +
+ +> - `Monolithic Application`: A single, large application that contains all components (Recruitment Website, Job Application, Job Vacancies, Recruiters, etc) bundled together. +> - The modules really rely on each other quite a bit. +> - It's tricky to scale features on their own. +> - Any updates mean we have to redeploy the whole app. +> - `Transition to Microservices`: The monolithic app is split into smaller, independent services (Recruiters, Job Application, Job Vacancies). +> - Each service can be developed, deployed, and scaled independently. +> - Easier to maintain and adopt new technologies per service. +> - `Docker`: Each microservice is packaged into application containers using Docker. +> - Provides portability across environments. +> - Ensures consistency between development and production. +> - `Kubernetes`: Containers are deployed and managed in a Kubernetes cluster (K8s). +> - Handles orchestration: scaling, load balancing, self-healing. +> - Enables automated deployments and rolling updates. + +## Container related services + +> Typical Flow: + +1. **Build image → Push to ACR** +2. **Choose deployment service:** + * AKS (more flexible orchestration) + * Container Apps (simpler, serverless) + * ACI (quick jobs) +3. **Add storage if needed** +4. **Configure networking, scaling, monitoring** + +
+ image +
+ +
+ 1. Azure Container Registry (ACR) (Click to expand) + +> This is where you store your container images (like Docker images). Think of it as your private container image repository. +> - **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. +> - **Setup order:** Usually first, because your deployment services need access to the images. + +
+ +
+2. Azure Kubernetes Service (AKS) (Click to expand) + +> A managed Kubernetes cluster for running containerized workloads at scale. +> - **When to use:** If you need orchestration, scaling, and advanced networking for multiple containers or microservices. +> - **Relation to ACR:** AKS pulls images from ACR to run your pods. +> - **Setup order:** After ACR is ready and your images are pushed. + +
+ +
+3. Azure Container Apps (Click to expand) + +> A serverless container platform for microservices and apps without managing Kubernetes directly. +> - **When to use:** If you want simplicity from management perspective and autoscaling. +> - **Relation to ACR:** Same as AKS, pulls images from ACR. +> - **Setup order:** After ACR. + +
+ +
+4. Azure Container Instances (ACI) (Click to expand) + +> Run containers quickly without orchestration, good for short-lived tasks or simple apps. +> - **When to use:** For lightweight workloads or batch jobs. +> - **Relation to ACR:** Can also pull images from ACR. + +
+ +
+5. Azure Container Storage (Click to expand) + +> Persistent storage for stateful containers. +> - **When to use:** If your containers need to keep data beyond their lifecycle (e.g., databases). +> - **Setup order:** Alongside AKS or Container Apps if needed. + +
+ +
+6. Azure Kubernetes Service Edge Essentials (Click to expand) + +> On-premises Kubernetes for edge scenarios. +> - **When to use:** If you need hybrid or edge deployments. + +
+ +## How to choose? + +image + +From [Choose an Azure compute service](https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree) + +## Pricing example + +> AKS `itself is free`; you pay for: +> - VMs in Node Pools (Standard vs Premium SSD, VM size) +> - Networking (Azure CNI vs Kubenet) +> - Storage +> - Optional features (e.g., Azure Monitor, Virtual Nodes) +> Your `node VM size and features define cost and performance.` + +How determine which **AKS tier** (or node size/configuration) you need, you can follow these steps: + +> [!NOTE] +> Quick Way to Decide: +- If you want **low cost** → B-series or Spot VMs. +- If you want **balanced performance** → D-series. +- If you need **high compute** → F-series or GPU nodes. + +1. Estimate Resource Requirements: + - **CPU & Memory per container**: Check your app’s baseline usage. + - **Number of containers per pod**: Multi-container apps share pod resources. + - **Expected traffic**: Peak vs average load. +2. Use AKS Recommendations: + - Enable **Cluster Autoscaler** and **Horizontal Pod Autoscaler**. + - Use **Azure Advisor** → It gives cost and performance recommendations based on telemetry. + +> [!TIP] +> Use [Azure Pricing Calculator](https://azure.microsoft.com/en-us/pricing/calculator/?msockid=38ec3806873362243e122ce086486339) and **AKS Sizing Guide**: + +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) + +| **Feature** | **Free Tier** | **Standard Tier** | **Premium Tier** | +| --------------------- | -------------------------------------------------- | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| **When to Use** | - Experiment with AKS at no cost
- New to AKS/Kubernetes | - Production or mission-critical workloads needing high availability
- Financially backed SLA | - Mission-critical workloads requiring **two years** of Kubernetes version support
- Highest reliability | +| **Supported Cluster Types** | - Dev/test clusters
- Clusters < 10 nodes | - Enterprise-grade or production workloads
- Up to 5,000 nodes | - Enterprise-grade or production workloads
- Up to 5,000 nodes | +| **Pricing** | - Free cluster management
- Pay-as-you-go for resources | - Pay-as-you-go for resources
- [Standard tier cluster management pricing](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/) | - Pay-as-you-go for resources
- [Premium tier cluster management pricing](https://azure.microsoft.com/en-us/pricing/details/kubernetes-service/)| +| **Feature Comparison** | - Recommended for clusters < 10 nodes
- Supports up to 1,000 nodes
- All AKS features | - Uptime SLA enabled
- Greater reliability
- Supports up to 5,000 nodes
- All AKS features | - Includes all Standard tier features
- [Microsoft maintenance past community support](https://learn.microsoft.com/en-us/azure/aks/long-term-support) | + +> [!TIP] +> Which Tier Should You Choose? +> - **Free Tier** → Best for **testing or learning**, small clusters (<10 nodes). +> - **Standard Tier** → Best for **production workloads**, SLA-backed, up to 5,000 nodes. +> - **Premium Tier** → Best for **mission-critical workloads**, extended Kubernetes version support (2 years), and advanced reliability. + +image + +> [!NOTE] +> Cost Impact as today (check last updated date): +> - **Free Tier**: $0 for cluster management, pay for nodes only. +> - **Standard Tier**: Adds cluster management cost (usually $0.10/hour per cluster). +> - **Premium Tier**: Higher cluster management cost + advanced support. + +E.g as today (check last updated date): + +image + +For VMs in Node Pools (Standard vs Premium SSD, VM size): + +image + +- 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). + - Copilot uses your `subscription details and resource availability to recommend the most suitable VM size.` + - It can also `assist with quota checks and guide you to request more capacity if needed.` + + image + +- 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) + + image + +From [Disk type comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types#disk-type-comparison) + +## Best practices + +- Cluster Size & Node Pools + - Use `Virtual Nodes or Burstable VMs (B-series) for cost efficiency.` + - `Spot instances for non-critical workloads.` +- Autoscaling: Enable `Cluster Autoscaler to scale nodes dynamically.` +- Container Registry: Use Azure Container Registry `(ACR) with geo-replication only if needed.` +- Networking Costs: Minimize cross-region traffic;` keep AKS and app services in same region.` +- Reserved Instances: For predictable workloads, `reserve VMs for 1–3 years to save up to ~57%.` + + +
+ Total views +

Refresh Date: 2025-09-05

+
+