4. Rolling Upgrades
What Will You Do¶
Many applications need to be available 24x7x365. When developers need to push out updates, they need their deployments to be seamlessly updated with zero downtime by incrementally updating pods with new ones. The new Pods will be scheduled on nodes with available resources.
For this exercise,
- You will deploy a workload to a few Kubernetes clusters
- You will use provided container images for your workload
- You will perform and watch a seamless rolling upgrade from "v1" to "v2" of the container image
Watch a 2 Min Demo Video for this exercise.
You have already provisioned or imported one or more Kubernetes clusters using the Controller.
Your clusters have the ability to connect to Docker Hub and pull images.
Step 1: Create Workload¶
- Login into the web Console
- Click on "New Workload", provide a name and disable "Inbound Traffic"
- On the "Container" configuration tab, click on "New Container"
- Enter a name for the service
- Select the "System Default Registry"
- Select the "Rafay Demo Image" and "v1.0" tag
- Select "2" for the Initial Replica Count
Save Container Config and Go To Policies
Ensure "Rolling Upgrade" is selected for Type of Upgrade
- Save and Go To Placement
- Select a cluster location where you would like to deploy your workload
- Save and Go To Publish
Step 2: Publish Workload¶
Once the Controller completes validation of your workload configuration,
- Click on Publish.
- Once deployment starts, click on Debug
In a few seconds, you should see "two pods" (replicas) running. Also, notice that the container image tag for each pod is "v1.0"
Step 3: Rolling Upgrade¶
We are now ready to upgrade the container in our workload.
- Navigate to the Container Config for the workload
- Update the "Image Tag" for the Demo Image to "v2.0"
- Save and Return to Container List
Navigate to Publish and Upgrade Workload
Once the process starts, click on Debug and select the "10 second" refresh option
- You should see the pods for the "v2.0" image come up in parallel
- Finally, both pods will have the "v2.0" image tags
Congratulations! You have successfully performed a "hitless" rolling upgrade of your containerized application.