Challenge 5: Update and Release with Zero Downtime

Previous Challenge

Introduction

Your marketing team has asked you to change your application’s homepage. They think that it should be more informative by explaining what your company is and what you actually sell. In this section, you’ll add some text to the homepage to make the marketing team happy.

To ensure seamless and uninterrupted service to your customers, we need to update your application with zero downtime using Kubernetes’ rolling updates functionality.

Description

It looks like one of our helpful developers has already created the changes with the file name index.js.new. You can copy this file to index.js and your changes will be reflected in the application.

Now that we’ve changed the application it needs to be rebuilt and a new container image needs to be created and pushed to the Artifact Registry with a new label to distinguish it from the original image.

Note Since this isn’t a ReactJS gHack, we will give you the command to run from the root folder of the React app (ie: ./react-app):

 npm run build:monolith

Now that the React app has been rebuilt, you can build and push a new container image.

Once we have a new container image ready, we need to roll it out to production.

Note If you list your pods after rolling out the update, you will see new Pods being created before the old Pods are deleted (look at their ages). This ensures zero downtime.

Navigate to your external IP and confirm the new changes are visible.

Success Criteria

  • You’ve updated the application’s homepage
  • You’ve deployed a new container image to your Artifact Registry docker repository
  • You’ve successfully rolled out the update to your pods and the external website is showing the changes.

Previous Challenge