Azure Kubernetes App Deploy
MicrosoftOfficialCreated by Microsoft
- Skill
- Tool integration
- Cloud and DevOps
- MIT
- Low risk
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill streamlines the deployment of web applications and APIs to an existing Azure Kubernetes Service (AKS) cluster. It performs automated framework detection to identify the application stack, generates appropriate Dockerfiles and Kubernetes manifests, and validates the configuration against AKS Deployment Safeguards. The process includes verification steps to ensure the application is correctly deployed and configured for the target environment.
What it does
- Detects application frameworks and sub-frameworks from project signal files.
- Automatically generates Dockerfiles and Kubernetes manifests based on detected project requirements.
- Validates configurations against AKS Deployment Safeguards (DS001–DS013).
- Resolves base image tags using floating major versions to maintain security and stability.
- Detects application ports and health endpoints to configure Kubernetes probes.
- Provides recovery procedures for deployment failures.
When to use it
- When you need to deploy an existing web application or API to an active AKS cluster.
- When you need to containerize a project for Kubernetes deployment.
- When you need to generate Kubernetes manifests tailored for Azure.
- When your deployment is failing due to AKS Deployment Safeguard checks.
- When setting up CI/CD pipelines for applications running on AKS.
Advantages
- Reduces manual effort in creating container and orchestration configurations.
- Ensures deployments adhere to established AKS Deployment Safeguards.
- Maintains up-to-date base images through automated major version resolution.
- Standardizes health probe and port configuration across different frameworks.
Usage examples
- “Deploy my Express application to the existing AKS cluster.”
- The agent detects the Node.js framework, generates a Dockerfile and Kubernetes manifests, validates them against AKS safeguards, and initiates the deployment.
- “My Spring Boot app deployment is failing AKS safeguard checks.”
- The agent analyzes the current configuration against the DS001-DS013 checklist to identify and resolve the specific safeguard violations.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/microsoft/azure-kubernetes-app-deploy/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip azure-kubernetes-app-deploy.zip -d .agents/skills
Documentation by Microsoft
Deploy to AKS
Use when: deploying a web app/API to AKS; containerizing for Kubernetes; generating manifests; AKS CI/CD; DS001–DS013 failures.
Not for: provisioning clusters (azure-kubernetes), AKS Automatic readiness (azure-kubernetes-automatic-readiness), non-AKS targets.
Workflow
Requires: existing AKS cluster, az login, kubectl configured. Follow phases/quick-deploy.md. On failure: references/rollback.md.
References
detection.md — framework/port/health detection
safeguards.md — DS001-DS013 checklist
workload-identity.md — Workload Identity setup
rollback.md — recovery procedures
base-images.md — base image policy and
<LATEST_STABLE_*>resolution
Knowledge Packs
Load knowledge-packs/frameworks/<framework>.md per detected framework. Available: spring-boot, express, nextjs, fastapi, django, nestjs, aspnet-core, go, flask
Templates
templates/ (dockerfiles/, k8s/, github-actions/, mermaid/).
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md2.0 KiB
- knowledge-packs/frameworks/aspnet-core.md7.3 KiB
- knowledge-packs/frameworks/django.md6.0 KiB
- knowledge-packs/frameworks/express.md6.7 KiB
- knowledge-packs/frameworks/fastapi.md5.8 KiB
- knowledge-packs/frameworks/flask.md6.2 KiB
- knowledge-packs/frameworks/go.md6.8 KiB
- knowledge-packs/frameworks/nestjs.md6.7 KiB
- knowledge-packs/frameworks/nextjs.md7.1 KiB
- knowledge-packs/frameworks/spring-boot.md6.0 KiB
- phases/quick-deploy.md7.8 KiB
- references/base-images.md3.6 KiB
- references/detection.md3.5 KiB
- references/rollback.md2.0 KiB
- references/safeguards.md2.9 KiB
- references/workload-identity.md7.4 KiB
- templates/dockerfiles/dotnet.Dockerfile2.6 KiB
- templates/dockerfiles/dotnet.dockerignore125 B
- templates/dockerfiles/go.Dockerfile2.1 KiB
- templates/dockerfiles/go.dockerignore128 B
- templates/dockerfiles/java.Dockerfile3.0 KiB
- templates/dockerfiles/java.dockerignore156 B
- templates/dockerfiles/node.Dockerfile3.0 KiB
- templates/dockerfiles/node.dockerignore173 B
- templates/dockerfiles/python.Dockerfile2.6 KiB
- templates/dockerfiles/python.dockerignore201 B
- templates/dockerfiles/rust.Dockerfile3.2 KiB
- templates/dockerfiles/rust.dockerignore87 B
- templates/github-actions/deploy.yml7.4 KiB
- templates/k8s/configmap.yaml1.0 KiB
- templates/k8s/deployment.yaml3.4 KiB
- templates/k8s/gateway.yaml1.5 KiB
- templates/k8s/hpa.yaml1.4 KiB
- templates/k8s/httproute.yaml1.3 KiB
- templates/k8s/ingress.yaml1.9 KiB
- templates/k8s/namespace.yaml734 B
- templates/k8s/networkpolicy.yaml1.6 KiB
- templates/k8s/pdb.yaml758 B
- templates/k8s/service.yaml864 B
- templates/k8s/serviceaccount.yaml1.4 KiB
- templates/mermaid/architecture-diagram.md1.6 KiB
- templates/mermaid/summary-dashboard.md1.7 KiB
phases/quick-deploy.md
Quick Deploy
Deploy an application to an existing AKS cluster with production-grade artifacts.
Section 1: Detection
Scan the project and Azure environment. Ask at most one clarifying question if genuinely ambiguous (multiple Dockerfiles, ACRs, or identities).
Framework Detection
Follow the framework detection table in references/detection.md. Scan for signal files at the project root (and one level deep for monorepos).
Port and Health Endpoint Detection
Follow the port and health endpoint detection tables in references/detection.md (first match wins). If none found, use /health as default in probes.
Existing Artifact Detection
Check for existing Dockerfile and k8s/ (or manifests/, deploy/) directories.
Azure Infrastructure Detection
kubectl config current-context
az aks show -g <rg> -n <cluster> -o jsonExtract from cluster details:
AKS flavor:
nodeProvisioningProfile.mode—"Auto"= AKS Automatic, otherwise StandardOIDC issuer:
oidcIssuerProfile.issuerUrlAzure RBAC:
aadProfile.enableAzureRBAC
Routing Detection
az aks show -g <rg> -n <cluster> --query '{webAppRoutingEnabled: ingressProfile.webAppRouting.enabled, istioMode: serviceMeshProfile.istio.mode}' -o jsonIf
webAppRoutingEnabledis nottrue, stop with error:az aks approuting enable -g <rg> -n <cluster>If
istioModeis"Enabled"→ use Gateway API (gateway.yaml+httproute.yaml,gatewayClassName: istio)Otherwise → use Ingress (
ingress.yaml,ingressClassName: webapprouting.kubernetes.azure.com)
az acr list -g <rg> -o json
az identity list -g <rg> -o jsonACR-AKS Integration
Verify the AKS kubelet identity can pull images from the detected ACR:
az aks check-acr --resource-group <rg> --name <cluster> --acr <acr-name>.azurecr.ioIf the check fails, attach the ACR (requires confirmation): az aks update -g <rg> -n <cluster> --attach-acr <acr-name>
If Azure RBAC is enabled, verify namespace create permission: kubectl auth can-i create namespaces — if no, stop and offer alternatives: have an admin create it, or deploy to an existing namespace.
If any detection command fails, suggest: az login, az account set -s <subscription-id>, az aks get-credentials -g <rg> -n <cluster>.
Knowledge Pack
After framework detection, load the matching pack from knowledge-packs/frameworks/ if available (see SKILL.md).
Knowledge packs influence Dockerfile optimization, probe configuration, and writable paths.
Section 2: File Generation
Write all files in a single response turn.
Dockerfile
If existing Dockerfile: Validate against best practices (multi-stage build, non-root USER, base tags pinned to a stable major tag (not :latest, not a frozen patch), layer caching, .dockerignore). Apply targeted fixes for failures — do not regenerate the file.
If no Dockerfile: Generate from the appropriate template:
| Language | Template |
|---|---|
| Node.js | templates/dockerfiles/node.Dockerfile |
| Python | templates/dockerfiles/python.Dockerfile |
| Java | templates/dockerfiles/java.Dockerfile |
| Go | templates/dockerfiles/go.Dockerfile |
| .NET | templates/dockerfiles/dotnet.Dockerfile |
| Rust | templates/dockerfiles/rust.Dockerfile |
Resolve the base image version. The templates carry <LATEST_STABLE_*>
placeholders. Before writing the Dockerfile, replace each with the current
stable major the project targets, following references/base-images.md
(explicit registry/release check; fall back to latest-known with a verify
comment). The generated Dockerfile must end up pinned to a concrete major tag
— this is required for DS009.
Generate .dockerignore if missing — use the matching template from templates/dockerfiles/<language>.dockerignore.
Kubernetes Manifests
If existing manifests found (in k8s/, manifests/, or deploy/): Validate against AKS Deployment Safeguards (Section 3) and apply targeted fixes. Do not regenerate — improve in place.
If no manifests found: Generate from templates/k8s/ templates. Replace <angle-bracket> placeholders with detected values.
| Manifest | Template | Notes |
|---|---|---|
k8s/namespace.yaml | templates/k8s/namespace.yaml | |
k8s/serviceaccount.yaml | templates/k8s/serviceaccount.yaml | Workload Identity |
k8s/deployment.yaml | templates/k8s/deployment.yaml | image tag set after az acr build, not at generation time |
k8s/service.yaml | templates/k8s/service.yaml | |
k8s/gateway.yaml | templates/k8s/gateway.yaml | Istio only |
k8s/httproute.yaml | templates/k8s/httproute.yaml | Istio only |
k8s/ingress.yaml | templates/k8s/ingress.yaml | Ingress only |
k8s/hpa.yaml | templates/k8s/hpa.yaml | min: 2, max: 10 |
k8s/pdb.yaml | templates/k8s/pdb.yaml | minAvailable: 1 |
k8s/configmap.yaml | templates/k8s/configmap.yaml | If env config needed |
k8s/networkpolicy.yaml | templates/k8s/networkpolicy.yaml | Ingress-controller-scoped |
Hostname
Omit the host field from Ingress rules (or Gateway listeners) for initial deployments — traffic routes to the external IP directly. Add host and TLS once the user has a domain.
Resource Sizing
Use the framework-specific defaults from the knowledge pack's "Resource Sizing" section. If no pack is loaded, use requests: {cpu: 100m, memory: 128Mi} and limits: {cpu: 500m, memory: 256Mi}.
Startup Probe
For slow-start frameworks (Java/Spring Boot, .NET with heavy DI), uncomment startupProbe in the deployment template to prevent liveness restarts during init.
Section 3: Safeguards Validation
Validate all generated manifests against DS001-DS013 (reference references/safeguards.md).
12 of 13 rules are auto-fixable. DS009 (no
:latesttag) is resolved by tagging with git SHA.Apply the writable paths from the loaded pack (for
readOnlyRootFilesystem: truecompliance with DS012).Reference
references/workload-identity.mdfor Workload Identity configuration.
AKS Automatic: all violations must be fixed.
AKS Standard: check safeguardsProfile.level:
az aks show -g <rg> -n <cluster> --query 'safeguardsProfile.level' -o tsvEnforcement: fix all violationsWarningorOff: warn, don't block
Section 4: Deploy
Ensure kubectl context
az aks get-credentials -g <resource_group> -n <aks_cluster_name> --overwrite-existingVerify Gateway API CRDs (only if Istio Gateway API detected)
kubectl get crd gateways.gateway.networking.k8s.io httproutes.gateway.networking.k8s.io 2>/dev/nullIf missing: kubectl apply -f https://github.com/kubernetes-sigs/gateway-api/releases/latest/download/standard-install.yaml
Build and push
IMAGE_TAG=$(git rev-parse --short HEAD) # fallback: date +%Y%m%d%H%M%S
az acr build --registry <acr_name> --image <app-name>:$IMAGE_TAG --file Dockerfile .Monorepo: Adjust --file and context to the app subdirectory (e.g., --file apps/myapp/Dockerfile apps/myapp/).
Deploy to cluster
# 1. Create namespace (must succeed before proceeding)
kubectl apply -f k8s/namespace.yaml
kubectl get namespace <namespace> -o name # verify
# 2. Apply remaining manifests
kubectl apply -f k8s/ --recursive
# 3. Wait for rollout
kubectl rollout status deployment/<app-name> -n <namespace> --timeout=300sIf any step fails, show the error and stop. See references/rollback.md for recovery.
Section 5: Verify
kubectl get pods -n <namespace> -l app=<app-name>
kubectl get gateway -n <namespace> -o jsonpath='{.items[0].status.addresses[0].value}' # if Gateway API
kubectl get ingress -n <namespace> -o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}' # if IngressWait up to 3 minutes for external IP, then curl the health endpoint.
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
What our scanner noticed· Low risk
- Instructions that use the network
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Microsoft
- Publisher
- Microsoft (Official)
- Source
- microsoft/skills · .github/plugins/azure-skills/skills/azure-kubernetes/azure-kubernetes-app-deploy · commit 0696600
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from .github/plugins/azure-skills/LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
- Also distributed in
- microsoft/azure-skills
AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-kubernetes-app-deploy.zip