A virtual service defines routing rules that control how traffic reaches destination services in a Service Mesh (ASM) instance. Each routing rule specifies matching criteria. When incoming traffic matches a rule, ASM forwards it to the designated destination service or a specific version (subset) of that service.
For configuration examples and field descriptions, see VirtualService in the Istio documentation.
Create a virtual service
-
Log on to the ASM console. In the left-side navigation pane, choose .
-
On the Mesh Management page, click the name of the ASM instance. In the left-side navigation pane, choose .
-
Create the virtual service by using one of the following methods:
-
Form: Click Create, configure the parameters, and then click Create.
-
YAML: Click Create from YAML. Select a namespace from the Namespace drop-down list and a template from the Template drop-down list. Modify the YAML configuration in the code editor, and then click Create.
-
View or edit the YAML configuration
-
On the VirtualService page, find the target virtual service and click YAML in the Actions column.
-
In the Edit dialog box, view or modify the configuration.
-
Click OK.
Roll back to a previous version
-
On the VirtualService page, find the target virtual service and click Version in the Actions column.
-
In the Version dialog box, modify the configurations.
-
Click Rollback.
Delete a virtual service
Deleting a virtual service disrupts request routing and traffic distribution, which can cause unexpected issues. Proceed with caution.
-
On the VirtualService page, find the target virtual service and click Delete in the Actions column.
-
In the Submit confirmation dialog box, click OK.