This topic describes how to how to delete earlier versions of a service after you release a stable version by using phased release .

Prerequisites

Delete an earlier service version from the CLI

Run the following command to modify the YAML file that has been deployed in Step 2: Release the latest version of a service to delete an earlier service version.
Note The annotations in the YAML file must also be deleted.
$ kubectl get ingress gray-release-02

Delete an earlier service version in the ACK console

  1. Log on to the ACK console.
  2. In the left-side navigation pane, choose Ingresses and Load Balancing > Ingresses.
  3. On the Ingresses page, select the target cluster from the Cluster drop-down list and select the target namespace from the Namespace drop-down list. Find the target Ingress and select Update from the More drop-down list in the Actions column.
    Ingress
  4. Perform the following steps:
    1. In the Update dialog box, choose Rules > Services, find the service version that you want to delete, and click the delete icon.
      Ingress rules
    2. Click Update.
  1. Return to the Ingresses page. The page shows only the Ingress rule that routes to the new-nginx service of the latest version.
    Ingress
  2. Log on to a master node of the cluster. Then, run the following curl command to send requests to the Ingress.
    $ curl -H "Host: www.example.com" http://<EXTERNAL_IP>
    nodes

The output shows that requests are routed to the new-nginx service of the latest version after the Ingress is updated. This means that the phased release process is complete. You can also delete the Deployments and Services that are deployed for the new-nginx service of the deleted version.