Skip to main content
In this guide, you’ll learn how to upgrade your running application from version v1 to v2 using Azure Container Registry (ACR) and Azure Kubernetes Service (AKS). We’ll cover exposing the app, performing a rolling update, verifying the new version, and—if needed—rolling back to a previous revision.

1. Expose Your Deployment via a LoadBalancer

First, ensure your v1 image is deployed and reachable from the Internet:
Check the service status:
If the EXTERNAL-IP remains <pending>, wait a minute or check your Azure networking configuration.

2. Perform a Rolling Update to v2

To point the existing deployment at your v2 image in ACR, use:
Kubernetes will perform a rolling update—terminating old pods and creating new ones—without downtime for your users.

3. Verify the Updated Version

Once the update completes, refresh your application’s public IP in the browser. You should see the v2 message. To confirm the deployment is using the new image:
Under Pod Template → Containers, look for: Image: crkodekloud.azurecr.io/kodekloudapp:v2

4. Rolling Back to a Previous Revision

Kubernetes retains a history of deployment revisions by default. If you encounter issues in v2, you can quickly revert to v1. View the rollout history:
Rolling back in production can affect end users. Consider testing rollbacks in a staging environment first.
To undo to the previous revision:
After the rollback finishes, refresh your app endpoint to confirm v1 is active again.

Next Steps

You’ve successfully managed upgrades and rollbacks in AKS. Next, explore Azure Kubernetes Fleet Management to coordinate multiple clusters and streamline governance.

Watch Video