将容器从 ACR 部署到 AKS [英] Deploying a container from ACR to AKS

查看:23
本文介绍了将容器从 ACR 部署到 AKS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个容器,其中包含一个非常简单的 Web 应用程序,该应用程序已上传到 Azure 容器注册表.我创建了一个 AKS 群集.现在我想将我的容器部署到 AKS.

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.

我找到了许多关于这方面的教程,但它们似乎都引用了几乎没有解释或没有解释的 YAML 文件.

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.

因此,我有两个问题:

  1. 是否需要使用 YAML 文件来实现这一点(kubectl create -f myyaml.yml)?(如果没有,有什么替代方案)

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

是否有任何文档说明这些文件中需要包含哪些内容,以及这些命令与哪些内容兼容(例如,我注意到 'kind: Deployment' 似乎只对 'apiVersion:apps/v1beta1')?

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')?

(交叉发布自 这里 根据 MS 的建议)

(Cross posted from here on the advice of MS)

推荐答案

A1.您应该在 yaml 文件中配置部署和服务并应用它.

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

A2.您可以按照从 ACR 通过 yam 文件在 AKS 中部署 Web 应用程序的步骤.以及 部署和使用 Azure Container Registry.

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.

更新

A1.接受 JSON 和 YAML 格式.你可以看到这个链接.也许你也可以通过命令和 API 来做到这一点,它也适用于开发人员.但是配置文件是一种更简单的方法.

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.事情确实是根据你的需要和你创造的.很难说至少是什么东西.如果你真的想知道至少.我个人认为,如果您只是创建 pod 或其他人并且不与它交互,那么 apiVersion 和容器的图像是必要的.有关详细信息,请参阅 YAML 简介:创建Kubernetes 部署.也许这个 链接 也有帮助.

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.

这篇关于将容器从 ACR 部署到 AKS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆