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://mp-staging.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

knowledge-packs/frameworks/spring-boot.md

Spring Boot Knowledge Pack

Applies to: Projects detected with pom.xml containing spring-boot-starter-web or build.gradle/build.gradle.kts containing org.springframework.boot

Quick Reference

PropertyValue
Signal filespom.xml with spring-boot-starter-web or build.gradle(.kts) with org.springframework.boot
Default port8080
Health path/actuator/health/liveness + /actuator/health/readiness
Base templatetemplates/dockerfiles/java.Dockerfile (+ references/base-images.md)

Dockerfile Patterns

The base template handles the multi-stage build. One Spring Boot-specific optimization worth applying: use layered JAR extraction (java -Djarmode=layertools -jar app.jar extract) so that dependencies, Spring Boot loader, and application code land in separate Docker layers — only changed layers are rebuilt or pushed on each deployment.


Health Endpoints

Spring Boot Actuator provides health endpoints out of the box:

EndpointPurposeProbe Type
/actuator/healthOverall healthGeneral
/actuator/health/livenessLiveness grouplivenessProbe
/actuator/health/readinessReadiness groupreadinessProbe
Required configuration

In application.properties or application.yml:

management.endpoints.web.exposure.include=health
management.endpoint.health.probes.enabled=true
management.endpoint.health.show-details=always

The probes are automatically enabled when running in Kubernetes (detected via the KUBERNETES_SERVICE_HOST env var), but it's best practice to enable them explicitly.

Probe configuration in Deployment manifest
startupProbe:
  httpGet:
    path: /actuator/health/liveness
    port: 8080
  periodSeconds: 10
  failureThreshold: 30        # allows up to 300s for JVM warmup + Spring context init
livenessProbe:
  httpGet:
    path: /actuator/health/liveness
    port: 8080
  periodSeconds: 15
  timeoutSeconds: 3
  failureThreshold: 3
readinessProbe:
  httpGet:
    path: /actuator/health/readiness
    port: 8080
  periodSeconds: 10
  timeoutSeconds: 3
  failureThreshold: 3

Important: Spring Boot apps require a startupProbe. JVM warmup and Spring context initialization typically take 15–60 seconds. Without it, the liveness probe may kill the pod before it finishes starting. The startup probe gives the app up to 300 seconds to become healthy before the liveness probe takes over. Uncomment the startupProbe section in the deployment template.


Database Profiles

Spring Boot uses Spring Profiles to switch database configurations:

ProfileActivationTypical Config File
defaultNo profile setapplication.properties — usually H2 in-memory
mysqlSPRING_PROFILES_ACTIVE=mysqlapplication-mysql.properties
postgresSPRING_PROFILES_ACTIVE=postgresapplication-postgres.properties
Environment variables for PostgreSQL on AKS
env:
  - name: SPRING_PROFILES_ACTIVE
    value: postgres
  - name: POSTGRES_URL
    value: "jdbc:postgresql://{{PG_SERVER_NAME}}.postgres.database.azure.com:5432/{{DB_NAME}}"
  - name: POSTGRES_USER
    value: "{{IDENTITY_NAME}}"
  - name: SPRING_DATASOURCE_AZURE_PASSWORDLESS_ENABLED
    value: "true"

With Workload Identity and the spring-cloud-azure-starter-jdbc-postgresql dependency, Spring Boot can authenticate to PostgreSQL without a password using Azure AD tokens.

ConfigMap pattern
apiVersion: v1
kind: ConfigMap
metadata:
  name: {{APP_NAME}}-config
data:
  SPRING_PROFILES_ACTIVE: "postgres"
  MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: "health"
  MANAGEMENT_ENDPOINT_HEALTH_PROBES_ENABLED: "true"

Writable Paths (DS012 Compliance)

When readOnlyRootFilesystem: true is set, Spring Boot needs /tmp writable:

  • Tomcat writes session data and compiled JSPs to /tmp

  • Multipart file uploads use /tmp as the staging directory

  • Spring Boot DevTools (if accidentally included) writes to /tmp

Required volume mount
volumes:
  - name: tmp
    emptyDir: {}
containers:
  - name: app
    volumeMounts:
      - name: tmp
        mountPath: /tmp

No other writable paths are typically needed for production Spring Boot apps.


Resource Sizing

Spring Boot apps running on the JVM need more memory than interpreted languages. These are starting-point defaults — tune based on observed usage.

ResourceRequestLimit
CPU250m1000m
Memory512Mi1Gi

Set -XX:MaxRAMPercentage=75.0 in JAVA_OPTS so the JVM uses at most 75% of the container's memory limit, leaving headroom for the OS and non-heap memory.


Port Configuration

  • Default port: 8080

  • Config property: server.port in application.properties

  • Env var override: SERVER_PORT=8080

Spring Boot always logs the port on startup: Tomcat started on port(s): 8080 (http)


Build Commands

Build ToolBuild CommandOutput
Maven./mvnw package -DskipTests -Btarget/*.jar
Gradle./gradlew bootJarbuild/libs/*.jar

The -B flag (batch mode) suppresses interactive Maven output — important for CI/CD and Docker builds.


Common Issues on AKS

IssueSymptomFix
JVM OOM in containerOOMKilled pod statusSet -XX:MaxRAMPercentage=75.0 in JAVA_OPTS and ensure memory limit >= 256Mi
Slow startupReadiness probe fails, pod restartedIncrease initialDelaySeconds to 45-60s, or add a startupProbe with higher failureThreshold
H2 in-memory on AKSData lost on pod restartSwitch to PostgreSQL profile — H2 is for local dev only
Connection refused to PostgreSQLPSQLException: Connection refusedVerify firewall rules on PostgreSQL Flexible Server allow AKS subnet
Image too large (>500MB)Slow pulls, high ACR storageUse Alpine base image + layered JAR extraction

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.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download azure-kubernetes-app-deploy.zip