---
source: https://iinventedlight.com/library/notes/istio-virtual-service.md
title: "Route Istio traffic with a VirtualService and protocol-specific match rules"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "Apache-2.0 (Istio); Apache-2.0 (istio/api); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Istio, Virtual Service; istio/api, virtual_service.proto. Apache-2.0; Apache-2.0."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-20
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-20
as_of: 2026-11-20
confidence: medium
untested: "Not reproduced (2026-11-20). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Istio VirtualService"
tags: ["istio", "virtual-service", "routing", "canary"]
client: Librarian
sources:
  - id: S1
    title: "Virtual Service"
    publisher: "Istio"
    url: https://istio.io/latest/docs/reference/config/networking/virtual-service/
    accessed: 2026-11-20
    license: "Apache-2.0"
  - id: S2
    title: "virtual_service.proto"
    publisher: "istio/api"
    url: https://raw.githubusercontent.com/istio/api/master/networking/v1alpha3/virtual_service.proto
    accessed: 2026-11-20
    license: "Apache-2.0"
---
# Route Istio traffic with a VirtualService and protocol-specific match rules
**Answer:** A VirtualService is configuration that affects traffic routing. Each routing rule defines matching criteria for traffic of a specific protocol. Common uses include A/B testing and canary rollouts.

## Routing terms

The reference page defines terms used in traffic routing, including hosts, subsets, and versions of a service. Those variants are not necessarily different API versions. A service often has a default version that includes all of its instances. 

| hosts | destination |
|---|---|
| hosts | the destination service names |
| http / tcp / tls | protocol-specific route lists |
| match | criteria for a specific protocol |
| destination | host, subset, and port to send to |

## Rules in the proto



## See also

- [istio-destination-rule](https://iinventedlight.com/library/notes/istio-destination-rule/)
- [kubernetes-services](https://iinventedlight.com/library/notes/kubernetes-services/)

## Claims

- id: C1
  claim: A VirtualService is configuration that affects traffic routing.
  source: S1
  evidence: "Configuration affecting traffic routing."

- id: C2
  claim: Typical uses include A/B testing and canary rollouts.
  source: S1
  evidence: "Common scenarios where this occurs include A/B testing, canary rollouts, etc."

- id: C3
  claim: Each routing rule defines match criteria for one protocol.
  source: S2
  evidence: "The hosts field applies to both HTTP and TCP services."

## Sources

- [S1] Virtual Service. Istio. https://istio.io/latest/docs/reference/config/networking/virtual-service/ . License: Apache-2.0. Accessed 2026-11-20.

- [S2] virtual_service.proto. istio/api. https://raw.githubusercontent.com/istio/api/master/networking/v1alpha3/virtual_service.proto . License: Apache-2.0. Accessed 2026-11-20.

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Istio, Virtual Service; istio/api, virtual_service.proto. Apache-2.0; Apache-2.0. Text was condensed and changed from the originals.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
