1. Release Notes
    1. Release Notes - 2.0.2Latest
    1. Release Notes - 2.0.1
    1. Release Notes - 2.0.0
  1. Introduction
    1. Introduction
    1. Features
    1. Architecture
    1. Advantages
    1. Glossary
  1. Installation
    1. Intruction
      1. Intro
      2. Port Requirements
    1. Install on Linux
      1. All-in-One Installation
      2. Multi-Node Installation
      3. Installing HA Master and Etcd Cluster
      4. Storage Configuration Instruction
    1. Install on Kubernetes
      1. Prerequisites
      2. Online Installation
      3. Offline Installation
    1. Related Tools
      1. Integrating Harbor Registry
    1. Cluster Operation
      1. Adding New Nodes
      2. High Risk Operation
      3. Uninstalling KubeSphere
  1. Quick Start
    1. Getting Started with Multitenancy
    1. Exposing your APP using Ingress
    1. Deploying a MySQL Application
    1. Deploying a Wordpress Website
    1. Job to compute π to 2000 places
    1. Deploying Grafana using APP Template
    1. Creating Horizontal Pod Autoscaler
    1. S2i: Publish your app without Dockerfile
    1. Canary Release of Microservice APP
    1. CI/CD based on Spring Boot Project
    1. Building a Pipeline in a Graphical Panel
    1. CI/CD based on GitLab and Harbor
    1. Ingress-Nginx for Grayscale Release
  1. Cluster Admin Guide
    1. Multi-tenant Management
      1. Overview of Multi-tenant Management
      2. Overview of Role Management
    1. Platform Management
      1. Account Management
      2. Platform Roles Management
    1. Infrastructure
      1. Service Components
      2. Nodes
      3. Storage Classes
    1. Monitoring Center
      1. Physical Resources
      2. Application Resources
    1. Application Repository
    1. Jenkins System Settings
  1. User Guide
    1. Application Template
    1. Workloads
      1. Deployments
      2. StatefulSets
      3. DaemonSets
      4. Jobs
      5. CronJobs
    1. Storage
      1. Volumes
    1. Network & Services
      1. Services
      2. Routes
    1. Configuration Center
      1. Secret
      2. ConfigMap
      3. Image Registry
    1. Project Settings
      1. Basic Information
      2. Member Roles
      3. Project Members
      4. Internet Access
    1. DevOps Project
      1. DevOps Project Management
      2. DevOps Project Management
      3. DevOps Project Management
      4. DevOps Project Management
      5. DevOps Project Management
  1. Development Guide
    1. Preparing the Development Environment
    1. Development Workflow
  1. API Documentation
    1. API Guide
    1. How to invoke KubeSphere API
KubeSphere®️ 2020 All Rights Reserved.

Managing Canary Release of Microservice App based on Istio

Istio's service mesh is able to manage traffic distribution without dependence on deployment scaling, which enables a simpler, yet significantly and functional way to realize canary release and rollout. It allows users to introduce a new version of a service by testing it with a small percentage of user traffic in the first place. And then if all goes well, increase, possibly gradually in increments. The percentage will simultaneously phase out the old version.

KubeSphere provides three kinds of grayscale strategies based on Istio, including blue-green deployment, canary release and traffic mirroring. Without modifying the source code, KubeSphere can realize grayscale, traffic governance, tracing, traffic monitoring and other service mesh features.

What is Bookinfo Application

The Bookinfo application is broken into four separate microservices (There are 3 versions of the reviews microservice):

  • Productpage. The productpage microservice calls the details and reviews microservices to populate the page.
  • Details. The details microservice contains book information.
  • Reviews. The reviews microservice contains book reviews. It also calls the ratings microservice.
  • Ratings. The ratings microservice contains book ranking information that accompanies a book review.

The end-to-end architecture of the application is shown below, see Bookinfo Application for more details.


In this tutorial, we're going to deploy a Bookinfo sample application composed of four separate microservices used to demonstrate the canary release, tracing and traffic monitoring using Istio on KubeSphere.


  • You've completed all steps in Getting Started with Multi-tenant Management.
  • You need to turn on the Application Governance to enable the tracing feature. (Choose Project Settings → Internet Access → Edit Gateway → Turn it On)

Hands-on Lab

Step 1: Deploy Bookinfo Application

1.1. Sign in with project-regular account and enter into the demo-project, navigate to Application, click on the Deploy New Application then choose Deploy sample app Bookinfo.

1.2. Click Create in the pop-up window, then Bookinfo application has been deployed successfully, application components are listed in this following page, as well as the routes and hostname.

1.3. Next you can access the Bookinfo homepage as following screenshot via Click to visit button. Click on the Normal user to enter into the summary page.

1.4. Notice that at this point it only shows - Reviewer1 and - Reviewer2 without any stars at the Book Reviews section, this is the initial status of this section.

Step 2: Create Canary Release for reviews service

2.1. Back to KubeSphere console, choose Grayscale Release and click on the Create Canary Release Job. **Then select **Canary Release and click Create Job

2.2. Fill in the basic information, e.g. canary-release, click Next and select reviews as the canary service, then click Next.

2.3. Enter v2 as Grayscale Release Version Number and fill in the new image blank with kubesphere/examples-bookinfo-reviews-v2:1.13.0 (i.e. Modify v1 to v2), then click Next.

2.4. The canary release supports Forward by traffic ratio and Forward by request content, in this tutorial we choose adjust the traffic ratio to manage traffic distribution between v1 and v2. Drag the slider to adjust v2 takes up 30% traffic, and v2 takes up 70%.

2.5. Click Create when you've completed configuration, then you're able to see the canary-release has been created successfully.

Step 3: Verify the Canary Release

When you visit the Bookinfo website again and refresh your browser repeatedly, you'll be able to see that the Bookinfo reviews section switch between v1 and v2 at a random rate of about 30% and 70% respectively.

Step 4: Inspect the Traffic Topology Graph

4.1. Connect to your SSH Client, use the following command to introduce real traffic to simulate the access to a bookinfo application every 0.5 seconds.

$ curl http://productpage.demo-project.

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0< 74  5183   74  3842    0     0  73957      0 --:--:-- --:--:-- --:--:-- 73884<!DOCTYPE html>

4.2. From the traffic management diagram, you can easily see the service invocation and dependencies, health, performance between different microservices.

4.3. Click on the reviews card. The traffic monitoring graph will come out including real-time data of Success rate, Traffic and Duration.

Step 5: Inspect the Tracing Details

KubeSphere provides distributed tracing feature based on Jaeger, which is used for monitoring and troubleshooting microservices-based distributed application.

5.1. Choose Tracing tab. You can clearly see all phases and internal calls of a request, as well as the period in each phase.

5.2. Click any item, you can even drill down to see the request details and this request is being processed by which machine (or container).

Step 6: Take Over All Traffic

6.1. As mentioned previously, when the canary version (v2) is released, it could be used to send 70% of traffic to the canary version. Publishers can test the new version online and collect user feedbacks.

Switch to Grayscale Release tab, click into canary-release.

6.2. Click ··· and select Take Over at reviews-v2. Then 100% of traffic will be sent to the new version (v2).

Note:  If anything goes wrong along the way, we can abort and rollback to the previous version (v1) in time.

6.3. Open the bookinfo page again and refresh the browsers several times. We can find that it only shows the v2 (ratings with black stars) in reviews module.

Step 7: Take Down the Old Version

When the new version v2 has been released online and takes over all the traffic. Also, the testing results and online users feedback are confirmed to be correct. You can take down the old version and remove the resources of v1.

Click on the Job Offline button to take down the old version.

Notice: If take down a specific version of the component, the associated workloads and istio related configuration resources will be removed simultaneously, it turns out that v1 is being replaced by v2.