简体   繁体   English

Set命令不适用于Azure Kubernetes群集中的部署更新

[英]Set command doesn't work for the deployment update in Azure Kubernetes cluster

I'm using Azure DevOps pipelines to update our deployment in K8s cluster in Azure. 我正在使用Azure DevOps管道更新Azure中K8s群集中的部署。 It used to be working fine until yesterday, as for some reason the Pods in the cluster remain in their previous state. 直到昨天,它一直运行良好,因为某些原因,集群中的Pod保持其以前的状态。 I can see that the image was successfully updated in ACR (container registry) and has a label 'latest'. 我可以看到该图像已在ACR(容器注册表)中成功更新,并带有标签“ latest”。 However, the release pipeline doesn't seem to be doing anything useful. 但是,发布管道似乎并没有做任何有用的事情。 I use 'set' command in the task to update the Pod (it is well described in the Kubernetes docs and cheatsheet here ) 我在任务中使用“设置”命令来更新波德(它在Kubernetes文档很好地描述和的cheatsheet 这里

This is the command sample extracted from the log: kubectl set image deployments/identityserver identityserver='myacr'/identityserver:latest -n identityserver-dev 这是从日志中提取的命令样本: kubectl set image deployments/identityserver identityserver='myacr'/identityserver:latest -n identityserver-dev

As it indicates, I'm getting the latest image from ACR and trying to roll an update. 如它所指示的,我正在从ACR获取最新的图像,并尝试进行更新。 It executes well (both in cmd and Azure DevOps). 它执行得很好(在cmd和Azure DevOps中)。 no errors, although, the Pod remains unaffected. 没有错误,但Pod保持不受影响。 Have I missed something in the docs? 我错过了文档中的某些内容吗? Should I raise the ticket with Microsoft? 我应该和微软一起出票吗?

why do you have ' in image name? 为什么在图片名称中有' also, latest wont work if you already have latest on the image, you need to be specific https://github.com/kubernetes/kubernetes/issues/33664 . 另外,如果图像上已经有latest ,则latest不起作用,您需要指定特定的https://github.com/kubernetes/kubernetes/issues/33664

This is not an Azure issue 这不是Azure问题

在此处检查关于SO的类似问题的答案,以及为什么在部署规范中使用:latest标记不是一个好的选择,以及提供的解决方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM