An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
Helm deployment to AKS from an Azure Managed Application is done the same way as from any ARM/Bicep deployment: the Managed Application’s ARM template provisions AKS and then invokes Helm (or uses an existing Helm chart) with values supplied from template parameters.
A practical approach, based on the patterns in the context, is:
- Package the application as a Helm chart
- Create the chart with
helm createand customize it for the application:- Define environment variables, connection strings, and other settings in
values.yamland reference them intemplates/deployment.yamlvia.Values(as shown in the App Configuration + Helm example):# values.yaml settings: color: red message: myMessage# templates/deployment.yaml (snippet) env: - name: Color value: {{ .Values.settings.color }} - name: Message value: {{ .Values.settings.message }} - For secrets, define a
Secrettemplate that reads from values and base64‑encodes them:# templates/secrets.yaml apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque data: password: {{ .Values.secrets.password | b64enc }}
- Define environment variables, connection strings, and other settings in
- Create the chart with
- Model dynamic values in the Helm chart
Typical dynamic values:- Image repository and tag
- Service type (ClusterIP/NodePort/LoadBalancer)
- Environment variables and connection strings
- Secrets
- Image and service type in
values.yaml:image: repository: acr.azurecr.io/mymicroservice pullPolicy: IfNotPresent service: type: NodePort port: 80 - Image tag passed at install/upgrade time:
helm upgrade --install mymicroserviceapp . \ --namespace=local \ --set mymicroserviceapp.image.tag="0.1.0" - Environment variables wired to values (Redis backend name example):
env: - name: REDIS value: {{ .Values.backendName }}
- Invoke Helm with dynamic values from deployment
From the deployment side (Managed Application/ARM), the pattern is:- Ensure AKS and ACR are provisioned and integrated, as described in the AKS + Helm guidance.
- Use a deployment script or automation step that:
- Receives ARM/Managed Application parameters (image tag, connection strings, etc.).
- Calls
helm install/helm upgradewith--setor--valuesto override defaults invalues.yaml:helm upgrade --install myrelease ./mychart \ --namespace my-namespace \ --set image.repository=${acrLoginServer}/myimage \ --set image.tag=${imageTag} \ --set settings.color=${color} \ --set settings.message=${message} \ --set secrets.password=${dbPassword}
- This is the same mechanism used in the AKS Helm examples where image tags and other settings are overridden at deployment time.
- Use “Use existing Helm chart” in automated deployments where applicable
The automated deployments guidance shows a pattern that is directly applicable:- Choose Use existing Helm chart.
- Provide:
- Charts path
-
values.yamlpath - Optional Helm chart overrides
- Those overrides are the dynamic values coming from deployment configuration (similar to ARM parameters) and are applied as Helm value overrides at deployment time.
- Best practices for managing dynamic values
- Keep defaults in
values.yaml, override only what is environment‑specific (image tags, connection strings, feature flags). This keeps the chart reusable across environments. - Use Secrets for sensitive data and map them from values as shown in the
secrets.yamlexample. Ensure the actual secret values are injected from deployment parameters and not hard‑coded in the chart. - Use a consistent naming scheme for values so ARM/Managed Application parameters map cleanly to
.Values(for example,settings.*,secrets.*,image.*). - Use
helm upgrade --installso the same deployment path handles both initial install and updates, as shown in the AKS Helm deployment example. - Integrate with Azure App Configuration if central configuration management is needed: the App Configuration + Helm sample shows using Helm values as defaults and letting the Azure App Configuration Kubernetes Provider overwrite them via ConfigMaps.
- Keep defaults in
- Connecting AKS and Helm from a Managed Application
- The Managed Application’s ARM template provisions:
- AKS cluster (with integrated ACR if needed).
- Any supporting resources (App Configuration, Key Vault, databases).
- A deployment script or automation step (triggered as part of the Managed Application deployment) then:
- Uses
az aks get-credentialsto connect to the AKS cluster. - Runs
helm repo add/helm repo updateif using remote charts, or points to the packaged chart. - Executes
helm install/helm upgradewith values derived from ARM/Managed Application parameters.
- Uses
- This matches the documented pattern of using Helm as the primary deployment mechanism for AKS workloads, with configuration injected at deployment time.
- The Managed Application’s ARM template provisions:
References:
- Install existing applications with Helm in Azure Kubernetes Service (AKS)
- Install existing applications with Helm
- Deploy applications with Helm
- Quickstart: Develop on Azure Kubernetes Service (AKS) with Helm
- Integrate with Kubernetes Deployment using Helm
- Automated deployments for Azure Kubernetes Service (AKS)
- Quickstart: Use Azure App Configuration in Azure Kubernetes Service
- Orchestrate microservices and multi-container applications for high scalability and availability