简体   繁体   中英

Azure devops build push image to aks

I am trying to configure release pipeline in Azure Devops to push image to registry. In the release pipeline I have two tasks run service and expose deployment. When there is no service and deployment in AKS or on first code checkin it works fine but on next checkin it fails service already exist. Any idea where am i doing wrong ?

you need to be using yaml files and kubectl apply . what you are doing is an imperative way of managing resource and kubectl apply would give you a declarative way of doing that, so it would only apply changes. But given that you only need to update the image, it will probably make more sense to do kubectl set image deployment/nginx-deployment nginx=nginx:1.9.1 , so use kubectl set image to update the image on the existing deployment. another option would be to use something like flux to manage images

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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