Virtual services are critical resources for traffic routing. You can use virtual services to manage requests that are sent to services in an Alibaba Cloud Service Mesh (ASM) instance. This topic describes how to create, modify, and delete a virtual service.

Create a virtual service

  1. Log on to the ASM console.
  2. In the left-side navigation pane, choose Service Mesh > Mesh Management.
  3. On the Mesh Management page, find the ASM instance that you want to configure. Click the name of the ASM instance or click Manage in the Actions column.
  4. On the details page of the ASM instance, choose Traffic Management > VirtualService in the left-side navigation pane. On the VirtualService page, click Create from YAML.
  5. Set the parameters for creating a virtual service by using one of the following methods:
    • On the Create page, select a namespace from the Namespace drop-down list, select a template that is used to create a virtual service from the Template drop-down list, modify the configurations of the template in the YAML code editor, and then click Create.
    • On the Create page, select a namespace from the Namespace drop-down list, select no template from the Template drop-down list, customize the configurations of a virtual service in the YAML code editor, and then click Create.

What to do next

Modify a virtual service

On the details page of the ASM instance, choose Traffic Management > VirtualService in the left-side navigation pane. On the VirtualService page, find the virtual service that you want to modify and click YAML in the Actions column. In the Edit panel, modify the configurations of the virtual service and click OK.

Delete a virtual service

On the details page of the ASM instance, choose Traffic Management > VirtualService in the left-side navigation pane. On the VirtualService page, find the virtual service that you want to delete and click Delete in the Actions column. In the Submit message, click OK.