This topic describes how to remove the earlier version of a service when the latest version of the service (which has been released through a gray release) has run without exceptions for a specified period of time.


Run a command

  1. Run the following command to edit the YAML file deployed by Step 2: Release the latest version of a service to remove the earlier version of the service:
    Note You need to remove the annotations field.
    $ kubectl get ingress gray-release-02

Use the Container Service console

  1. Log on to the Container Service console.
  2. In the left-side navigation pane under Kubernetes, choose Application > Ingress.
  3. Select the target cluster and namespace, select the target Ingress, and click Update in the action column.
  4. In the displayed dialog box, modify the Ingress as follows:
    1. In the Rule > Service area, remove the earlier version of the service rule.
    2. Click Update.
  1. Return to the Ingress page. Here, you can see that only one Ingress rule points to the new-nginx service.
  2. Log on to the Master node and run the curl command to view the Ingress access.
    $ curl -H "Host:" http://<EXTERNAL_IP>

Now, all requests are routed to the latest version of the service, which means you have completed the gray release deployment cycle. You can also remove the deployment and service of the earlier version.