AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

azure-kubernetes-app-deploy

Use when deploying an existing web application or API to an already-running Azure Kubernetes Service cluster. Detects the framework, generates a Dockerfile and Kubernetes manifests, validates against AKS Deployment Safeguards, and deploys with verification. WHEN: deploy app to AKS, deploy to existing AKS cluster, containerize app for Kubernetes, generate K8s manifests for Azure, set up CI/CD for AKS, my AKS deployment is failing safeguard checks, I have a Django/Express/Spring Boot app to run on AKS. DO NOT USE FOR: creating or provisioning an AKS cluster (use azure-kubernetes), assessing migration to AKS Automatic (use azure-kubernetes-automatic-readiness), or deploying to non-AKS targets like Web Apps, Container Apps, or Functions.

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read microsoft--azure-kubernetes-app-deploy at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 18

references/rollback.md

Rollback Guidance

Recovery procedures for deployment failures. Referenced from Section 4 (Deploy).


Image Build Failed

# No cloud resources were persisted — nothing to roll back.
# Fix the issue and retry:

# Common fixes:
# - Dockerfile syntax error       → edit Dockerfile
# - Missing file in build context → check .dockerignore
# - Dependency install failure    → fix package.json / requirements.txt / go.mod

# Retry:
az acr build --registry <acr-name> --image <app-name>:<git-sha> .

kubectl apply Failed (Section 4 — Deploy to Cluster)

# Remove the partially applied resources:
kubectl delete -f k8s/

# Common fixes:
# - YAML syntax error      → validate with: kubectl apply -f k8s/ --dry-run=client
# - Invalid resource field  → check API version matches cluster version
# - Image pull error        → verify ACR name in deployment.yaml matches actual ACR
# - Namespace doesn't exist → create it first or remove namespace from manifests

# Fix and retry:
kubectl apply -f k8s/

Pods Not Starting (Section 5 — Verify)

# Diagnose:
kubectl get pods -l app=myapp
kubectl describe pod -l app=myapp
kubectl logs -l app=myapp --tail=50

# Common error patterns:

# CrashLoopBackOff — app crashes on startup
#   → Check logs for the crash reason
#   → Usually: missing env var, bad database connection string, port mismatch

# ImagePullBackOff — can't pull the container image
#   → Verify image name: kubectl get deployment myapp -o jsonpath='{.spec.template.spec.containers[0].image}'
#   → Verify ACR access: az aks check-acr --resource-group <rg> --name <aks> --acr <acr>.azurecr.io

# Pending — pod can't be scheduled
#   → Check node status: kubectl get nodes
#   → Check resource requests vs available capacity: kubectl describe nodes

# OOMKilled — app exceeded memory limit
#   → Increase memory limit in k8s/deployment.yaml and re-apply

# After fixing, re-apply:
kubectl apply -f k8s/
kubectl rollout status deployment/myapp --timeout=300s