Generated banner for Azure Kubernetes App Deploy
Generated logo for Azure Kubernetes App Deploy

Azure Kubernetes App Deploy

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Tool integration
  • Cloud and DevOps
  • MIT
  • Low risk

From the author

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.
— the description by Microsoft

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

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/microsoft/azure-kubernetes-app-deploy/download
  2. Unzip 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

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

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 json

Extract from cluster details:

  • AKS flavor: nodeProvisioningProfile.mode — "Auto" = AKS Automatic, otherwise Standard

  • OIDC issuer: oidcIssuerProfile.issuerUrl

  • Azure RBAC: aadProfile.enableAzureRBAC

Routing Detection
az aks show -g <rg> -n <cluster> --query '{webAppRoutingEnabled: ingressProfile.webAppRouting.enabled, istioMode: serviceMeshProfile.istio.mode}' -o json
  • If webAppRoutingEnabled is not true, stop with error: az aks approuting enable -g <rg> -n <cluster>

  • If istioMode is "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 json
ACR-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.io

If 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:

LanguageTemplate
Node.jstemplates/dockerfiles/node.Dockerfile
Pythontemplates/dockerfiles/python.Dockerfile
Javatemplates/dockerfiles/java.Dockerfile
Gotemplates/dockerfiles/go.Dockerfile
.NETtemplates/dockerfiles/dotnet.Dockerfile
Rusttemplates/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.

ManifestTemplateNotes
k8s/namespace.yamltemplates/k8s/namespace.yaml
k8s/serviceaccount.yamltemplates/k8s/serviceaccount.yamlWorkload Identity
k8s/deployment.yamltemplates/k8s/deployment.yamlimage tag set after az acr build, not at generation time
k8s/service.yamltemplates/k8s/service.yaml
k8s/gateway.yamltemplates/k8s/gateway.yamlIstio only
k8s/httproute.yamltemplates/k8s/httproute.yamlIstio only
k8s/ingress.yamltemplates/k8s/ingress.yamlIngress only
k8s/hpa.yamltemplates/k8s/hpa.yamlmin: 2, max: 10
k8s/pdb.yamltemplates/k8s/pdb.yamlminAvailable: 1
k8s/configmap.yamltemplates/k8s/configmap.yamlIf env config needed
k8s/networkpolicy.yamltemplates/k8s/networkpolicy.yamlIngress-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 :latest tag) is resolved by tagging with git SHA.

  • Apply the writable paths from the loaded pack (for readOnlyRootFilesystem: true compliance with DS012).

  • Reference references/workload-identity.md for 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 tsv
  • Enforcement: fix all violations

  • Warning or Off: warn, don't block


Section 4: Deploy

Ensure kubectl context
az aks get-credentials -g <resource_group> -n <aks_cluster_name> --overwrite-existing
Verify Gateway API CRDs (only if Istio Gateway API detected)
kubectl get crd gateways.gateway.networking.k8s.io httproutes.gateway.networking.k8s.io 2>/dev/null

If 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=300s

If 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 Ingress

Wait 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