Setting the file. One moment.
Chapter 10 · Azure Cloud Migrate
Subchapter 10.15
references/services/container-apps/k8s-to-container-apps.mdMarkdown5 KBView on GitHub
Detailed guidance for migrating containerized workloads from Kubernetes (GKE, EKS, self-hosted) to Azure Container Apps.
| Kubernetes Source | Azure Equivalent |
|---|---|
| GKE / EKS / Self-hosted Kubernetes | Azure Container Apps |
| Docker Registry / GCR / ECR | Azure Container Registry (ACR) |
| ConfigMap | Container Apps Environment Variables / Secrets |
| Secret | Azure Key Vault + Key Vault references |
| Ingress | Container Apps Ingress |
| Service (LoadBalancer/ClusterIP) | Container Apps Ingress (external/internal) |
| HPA (Horizontal Pod Autoscaler) | Container Apps Scaling Rules |
| Namespace | Container Apps Environment |
| Persistent Volume | Azure Files / Blob Storage (via volume mounts) |
| Kubernetes Resource | Container Apps Equivalent | Notes |
|---|---|---|
| Deployment | Container App | One deployment → one Container App |
| Service (type: LoadBalancer) | Ingress (external: true) | Public endpoint |
| Service (type: ClusterIP) | Ingress (external: false) | Internal only |
| ConfigMap | env with plaintext values | Use Key Vault for sensitive data |
| Secret | secretRef + Key Vault | Managed identity for access |
| HPA | scale rules (http, cpu, memory, custom) | HTTP concurrency, queue depth, etc. |
| Ingress | Ingress configuration | Automatic HTTPS, custom domains |
| Liveness/Readiness Probe | Health probes | HTTP, TCP, or startup probes |
| Kubernetes Manifest | Container Apps CLI/Bicep | Example |
|---|---|---|
replicas: 3 | --min-replicas 3 --max-replicas 3 | Static scaling |
resources.requests.cpu | --cpu 0.5 | CPU cores (0.25-4.0) |
resources.requests.memory | --memory 1Gi | Memory (0.5Gi-8Gi) |
image: gcr.io/my-registry/app:v1 | --image myacr.azurecr.io/app:v1 | After ACR import |
env: - name: KEY, value: val | --env-vars KEY=val | Environment variables |
env: - name: SECRET, valueFrom: secretKeyRef | --secrets SECRET=keyvaultref:... | Key Vault reference |
ports: - containerPort: 8080 | --target-port 8080 | Container port |
livenessProbe.httpGet.path: /health | YAML/Bicep probes config | Health probes not configurable via CLI |
Follow these phases sequentially:
kubectl get deployment,service,configmap,secret -o yaml to export manifestsSee assessment-guide.md for detailed checklist.
az acr createaz acr importdocker build → docker pushaz containerapp registry setSee deployment-guide.md for step-by-step deployment.
Container Apps does NOT support:
For batch and scheduled workloads, migrate Kubernetes Jobs / CronJobs to Azure Container Apps Jobs instead of long-running Container Apps.
For unsupported Kubernetes platform features, consider Azure Kubernetes Service (AKS) instead.