Updating an application in AKS requires two things:
- Publishing a new image to Azure Container Registry
- Setting a new image as the actual one in AKS
When you make changes in your application, you need two commands to update it in a registry. First, change its version to a new one:
docker tag handsonazurehello {ACR_LOGIN_SERVER}/handsonazurehello:v2
Now what you need is to push this version to make it available in the cloud:
docker push{ACR_LOGIN_SERVER}/handsonazurehello:v2
The final step to tell Kubernetes to update an image:
kubectl set image deployment handsonazurehello handsonazurehello={ACR_LOGIN_SERVER}/handsonazurehello:v2