What is the difference between Istio VirtualService and Kubernetes Service?
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
Introduction
A Kubernetes Service and an Istio VirtualService both affect how traffic reaches workloads, but they solve different problems. A Kubernetes Service gives clients a stable network identity for a set of pods. An Istio VirtualService adds higher-level routing rules on top of that identity, such as traffic splitting, path matching, retries, and header-based routing.
What a Kubernetes Service Does
A Kubernetes Service selects pods with labels and exposes them behind a stable name and virtual IP. It solves discovery and basic load balancing.
With that object in place, other workloads can call http://reviews inside the cluster without caring which pod IPs are currently alive.
A Service works at the Kubernetes networking layer. It does not by itself express rules such as "send 10 percent of traffic to v2" or "route requests with header x-user: beta to a canary deployment."
What an Istio VirtualService Does
A VirtualService tells the Istio proxies how to route traffic to a destination service. It operates at the request-routing layer, not just at the endpoint-selection layer.
This does not replace the Kubernetes Service. It tells Istio how to route requests that target the reviews service.
In a typical mesh setup, the VirtualService works together with a DestinationRule that defines the subsets:
Without the Service, clients would not have the normal Kubernetes service identity. Without the VirtualService, Istio would not know about the advanced routing policy.
Different Layers, Different Responsibilities
A practical way to think about the difference is this:
- Kubernetes
Service: "Which pods back this stable service name?" - Istio
VirtualService: "Given a request to that service, how should traffic be routed?"
That distinction shows up in real features.
A Kubernetes Service gives you:
- stable DNS name
- stable virtual IP
- basic load balancing across matching pods
An Istio VirtualService gives you:
- path and header matching
- canary and blue-green traffic splitting
- retries, timeouts, and fault injection in traffic rules
- routing to different versions of the same service
Example: You Usually Need Both
Suppose you run two versions of reviews, tagged version: v1 and version: v2.
The Kubernetes Service selects all reviews pods so the service exists at one cluster DNS name. The VirtualService then tells Istio to send most traffic to v1 and a smaller percentage to v2.
That is why asking "Service or VirtualService?" is often the wrong framing. In Istio, the common answer is "both, for different reasons."
Common Pitfalls
- Expecting a Kubernetes
Serviceto handle canary routing or header-based traffic rules by itself. - Creating a
VirtualServicewithout understanding that the destination still refers to a real service host. - Forgetting the matching
DestinationRulewhen routing to subsets likev1andv2. - Treating Istio routing objects as a replacement for basic Kubernetes service discovery.
- Debugging only the
VirtualServicewhen the underlyingServiceselector is wrong and no healthy endpoints exist.
Summary
- A Kubernetes
Serviceprovides stable discovery and basic load balancing for pods. - An Istio
VirtualServiceadds application-level routing policy for traffic that targets that service. - The
VirtualServiceusually depends on a real service host and often aDestinationRule. - Use a
Servicefor identity and endpoint grouping. - Use a
VirtualServicefor canary releases, header matching, retries, and other traffic-management rules.
Related reading
- What is the difference between kubernetes and GKE?
- What is the difference between Kubernetes Engine and Container Engine and why the latter one does not appear on my dashboard?
- what is the difference between l2 cni plugin vs l3 plugin?
- What is the difference between namespaces and contexts in Kubernetes?
- What is the difference between PaginatedQueryList and QueryResultPage in DynamoDB?
- What is the difference between partition key and sort key in amazon dynamodb?
- What is the difference between patches vs patchesJson6902 in Kustomize
- What is the difference between persistent volume PV and persistent volume claim PVC in simple terms?

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.