更新工作负载至新镜像

huangapple go评论68阅读模式
英文:

Aks update workload to new image

问题

我正在运行 Azure Kubernetes 服务 (AKS)。

我已经部署了一个镜像到 Azure 容器注册表。

而工作负载显示在那里。

但现在我需要更改一些设置或更新代码。我已经将新镜像发布到 ACR。但现在我找不到如何告诉 AKS 开始更新 Pod 到最新的镜像?

英文:

I am running an azure Kubernetes Service (AKS).

I have deployed an image to the azure container registry.

And the workload shows there.

But now I have to change some settings or update the code. I have published the new image to ACR. But now I cannot find out how to tell AKS to start updating the pods to the latest image?

答案1

得分: 2

AFAIK,AKS 不能直接使用 ACR 中的最新镜像版本更新其应用程序。我尝试通过在清单文件中设置镜像策略来实现相同的目标,但对于现有的 Pod 来说并不起作用。只有新创建的 Pod 才能拉取最新的镜像。

但根据您的需求,您可以利用 CICD(持续集成/持续部署)或 GitOps 方法来管理 AKS。我建议查阅以下链接以获取详细信息:

  1. 在 Azure 管道中进行 AKS 应用程序的 CI/CD
  2. Azure Kubernetes Service 的 GitOps

这些资源将为您提供有关配置 CICD 管道或在 AKS 中实施 GitOps 实践以使用 ACR 中的最新可用镜像更新应用程序的指导。

英文:

AFAIK, AKS cannot update its application directly with the latest image when a new image version is available in ACR. I tried to achieve the same thing by setting image policies in manifest files, but it does not work for existing pods. Only the newly created pods will be able to pull the latest image.

But as per your requirement, you can utilize CICD (Continuous Integration/Continuous Deployment) or GitOps methodologies for AKS. I suggest referring to the following links for detailed information:

  1. CI/CD for AKS apps with Azure Pipelines
  2. GitOps for Azure Kubernetes Service

These resources will provide you with guidance on configuring CICD pipelines or implementing GitOps practices in AKS to update your application with the latest available image from ACR.

huangapple
  • 本文由 发表于 2023年6月15日 00:01:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/76475496.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定