Skip to content

Commit 8582df0

Browse files
authored
Document migration process for AKS
Added migration process details for stateless and stateful applications, including infrastructure and application components.
1 parent 2d52dd1 commit 8582df0

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

0_Azure/8_AzureApps/demos/1_fromMulti-containerWebApp_toAKS.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Last updated: 2025-10-23
2929

3030
- [Best practices for performance and scaling for small to medium workloads in Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/best-practices-performance-scale)
3131
- [Best practices for performance and scaling for large workloads in Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/best-practices-performance-scale-large)
32+
- [Best practices for network policies in Azure Kubernetes Service (AKS)](https://learn.microsoft.com/en-us/azure/aks/network-policy-best-practices)
33+
- [We can use Cilium instead of `kube-proxy`](https://learn.microsoft.com/en-us/azure/aks/network-policy-best-practices#azure-powered-by-cilium)
34+
35+
<img width="1693" height="738" alt="image" src="https://github.com/user-attachments/assets/22185e92-58ac-4119-9c56-c1c87345c242" />
3236

3337
</details>
3438

@@ -39,6 +43,7 @@ Last updated: 2025-10-23
3943
- [Container related services](#container-related-services)
4044
- [How to choose?](#how-to-choose)
4145
- [Pricing example](#pricing-example)
46+
- [Migration process](#migration-process)
4247
- [Best practices](#best-practices)
4348

4449
</details>
@@ -224,6 +229,28 @@ For VMs in Node Pools (Standard vs Premium SSD, VM size):
224229

225230
From [Disk type comparison](https://learn.microsoft.com/en-us/azure/virtual-machines/disks-types#disk-type-comparison)
226231

232+
## Migration process
233+
234+
> Difference Between Stateless and Stateful Applications:
235+
236+
| **Aspect** | **Stateless Application** | **Stateful Application** |
237+
| -------------------- | ------------------------------------------------------------ | ------------------------------------------------------------- |
238+
| **Definition** | `Does not retain data or session state` between requests. | `Maintains data or session state across` requests or restarts. |
239+
| **Examples** | Web front-end, REST APIs, microservices without persistence. | Databases, message queues, AI model serving with local cache. |
240+
| **Scaling** | Easy to scale horizontally; `no dependency on storage.` | Requires persistent storage and careful scaling strategies. |
241+
| **Storage Needs** | None or external (e.g., cloud DB). | Needs Persistent Volumes (PV/PVC) and StatefulSets in AKS. |
242+
| **Migration Effort** | Mostly lift-and-shift (Deployment + Service). | Requires PV/PVC, StatefulSets, backup/restore planning. |
243+
244+
> ACA (Azure Container Application) → AKS Migration:
245+
- **Stateless apps** → Mostly lift-and-shift (Deployment + Service + Ingress).
246+
- **Stateful apps** → Additional work for storage, StatefulSets, and backup strategies.
247+
- **Infrastructure changes** → Networking, ingress, scaling, monitoring, and governance must be explicitly configured in AKS.
248+
249+
| **Category** | **Details** |
250+
| ----------------------------- | -------------- |
251+
| **Infrastructure Components** | - **Container Image**: Reuse from Azure Container Registry (ACR); configure image pull secrets.<br>- **Networking**: Plan VNet, node pool subnet, Service CIDR, Pod CIDR.<br>- **Ingress / Routing**: Deploy Ingress Controller (NGINX or Azure Application Gateway), configure DNS and TLS.<br>- **Scaling**: Set up Horizontal Pod Autoscaler (HPA) or install KEDA manually.<br>- **Monitoring**: Enable Azure Monitor for Containers and Log Analytics.<br>- **Secrets Management**: Create Kubernetes Secrets for sensitive data.<br>- **Persistent Storage**: Define Persistent Volumes (PV), Persistent Volume Claims (PVC), and StatefulSets for stateful workloads.<br>- **Governance**: Apply Azure Policy and RBAC for cluster compliance. |
252+
| **Application Components** | - **App Code**: No major changes if already containerized; validate readiness for Kubernetes (health probes, resource limits).<br>- **Environment Variables**: Move to ConfigMaps (non-sensitive) and Secrets (sensitive).<br>- **Ingress Rules**: Create Kubernetes Ingress YAML for routing.<br>- **Autoscaling Policies**: Configure resource requests/limits and HPA/KEDA triggers.<br>- **Advanced Features**: Install Dapr for service invocation or event-driven patterns; configure GPU node pools for AI workloads.<br>- **Stateful Logic**: Update app to use persistent storage paths if needed.<br>- **Observability Hooks**: Ensure app exposes metrics for Prometheus/Azure Monitor integration. |
253+
227254
## Best practices
228255

229256
- Cluster Size & Node Pools

0 commit comments

Comments
 (0)