Deploying a container from ACR to AKS

9/26/2018

I have a Container with a very simple Web App uploaded to an Azure Container Registry. I have an AKS cluster created. Now I want to deploy my container into AKS.

I've found a number of tutorials on this, but they all seem to refer to YAML files that have very little, or no, explanation.

I, therefore, have two questions:

  1. Is it necessary to use a YAML file to achieve this (kubectl create -f myyaml.yml)? (If not, what are the alternatives)

  2. Is there any documentation for exactly what needs to be in these files, and what those commands are compatible with (for example, I've noticed that 'kind: Deployment' seems to only be valid with 'apiVersion: apps/v1beta1')?

(Cross posted from here on the advice of MS)

--
azure
azure-container-registry
azure-kubernetes
containers
yaml

1 Answer

9/26/2018

A1. You should configure the deployments and services in the yaml file and apply it.

A2. You can follow the steps that deploy the Web App in AKS from ACR through yam file. And the details in Deploy and use Azure Container Registry.

Update

A1. JSON and YAML formats are accepted. You can see this link. And maybe you also can do that through command and API, it's also for developers. But the configuration file is an easier way.

A2. The things indeed are in according to what you need and what you to create. It's diffcult to say what are the things at least. If you really want to know the things at least. In my own opinion, the apiVersion and the image of the container are necessary if you just create the pod or others and don't interact with it. For more details, see Introduction to YAML: Creating a Kubernetes deployment. Maybe this link is also helpful.

-- Charles Xu
Source: StackOverflow