Deploying a container from ACR to AKS

梦想与她 提交于 2019-12-20 05:12:06

问题


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)


回答1:


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.



来源:https://stackoverflow.com/questions/52512097/deploying-a-container-from-acr-to-aks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!