Azure-docs: How to deploy a container from ACR to AKS using Helm

Created on 17 Jun 2019  Â·  10Comments  Â·  Source: MicrosoftDocs/azure-docs

I want to deploy an ACR (Azure container registry) service to AKS (Azure Kubenetes Service) using Helm.
I have setup the AKS.
I have an ACR service.

Please show me how to deploy a container from ACR to AKS using Helm.


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

container-servicsvc cxp in-progress product-question triaged

Most helpful comment

@cuongdnv We can achieve this using 2 ways.

  • You can give access to AKS to pull images from the ACI. Once thats done, Then in helm chart you need to provide only the ACR image url. Authentication is taken care by the role assignment.
  • You need to create a secret as described here. With that secret, kubernetes will download the images. Example for creating a pull secret in helm chart is here.

You can also use azure Devops to streamline all continuous integration and deployment processes. Azure devops doc for deploying into kubernetes is here.

try this out and let me know

All 10 comments

@cuongdnv Thanks for the question! We are investigating and will update you shortly.

@cuongdnv We can achieve this using 2 ways.

  • You can give access to AKS to pull images from the ACI. Once thats done, Then in helm chart you need to provide only the ACR image url. Authentication is taken care by the role assignment.
  • You need to create a secret as described here. With that secret, kubernetes will download the images. Example for creating a pull secret in helm chart is here.

You can also use azure Devops to streamline all continuous integration and deployment processes. Azure devops doc for deploying into kubernetes is here.

try this out and let me know

In first way. How can i provide ACR image url to helm chart. Give me an example please? (The helm file with provided url )
Thanks you.

I've put this overall request on our backlog as proposed item for future doc work.

please-close

@cuongdnv you need to create a new helm chart for your application.
I suggest you to go through this document for more information about charts.

I am giving quick info here.
To create a chart from command line use helm create <chart name>
It will create a chart with default templates(One deployment, service and one ingress). By default that ingress will be in disabled state.

You can find many files in the chart directory. In that pick values.yaml. You need to give your image details there as shown below.
Part of the values.yaml file is here

image:
  repository: <acr name>.azurecr.io/<your repo name>
  tag: <tag name>
  pullPolicy: IfNotPresent

After adding these details, You will be able to deploy that image from ACR to AKS.
If suggest you to go through the helm quick start guide where we will be using the pre-created charts.
Once that is done then we can go for Chart creation(for advanced users).

Thank you @jakaruna-MSFT

@jakaruna-MSFT
i have trouble with helm .
yesterday i installed helm and run successfully helm chart .
But today when i back to work i can't see tiller on the server .
some command i tried
$helm version
Client: &version.Version{SemVer:"v2.14.1", GitCommit:"5270352a09c7e8b6e8c9593002a73535276507c0", GitTreeState:"clean"}
Error: could not find a ready tiller pod
then i tried to upgrade tiller:
$helm init --service-account tiller --history-max 200 --wait --upgrade
$HELM_HOME has been configured at /home/cuongndv/.helm.
Error: tiller was not found. polling deadline exceeded

I switch to another cluster and then reinstalled Helm but i can't fix it.

I written a Nodejs service , and build it by docker . Then i pushed it into Azure Container Registry . I used Helm to pull Repository from ACR and then deploy to AKS but service not run . Please tell me some advise.

The code of Helm Value . I thing i have to setting type and port of service.

replicaCount: 1

image:
repository: tungthtestcontainer.azurecr.io/demonode
tag: latest
pullPolicy: IfNotPresent

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

service:
name: http
type: NodePort
port: 8082
internalPort: 8082

ingress:
enabled: false
annotations: {}
hosts:
- host: chart-example.local
paths: []

tls: []

resources: {}

nodeSelector: {}

tolerations: []

affinity: {}

@cuongdnv Please paste the events.
Kubectl get events -w -n
We can identify the issues with events only

If your question is not specific to the DOC, Then you can post your question in this MSDN forum.
Community is active over there as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JamesDLD picture JamesDLD  Â·  3Comments

behnam89 picture behnam89  Â·  3Comments

bityob picture bityob  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments

spottedmahn picture spottedmahn  Â·  3Comments