Interview › Istio & Service Mesh
What is a ServiceEntry, and when do you need one?
Istio & Service Mesh · Basic level
Answer
A ServiceEntry adds external or otherwise non-Kubernetes services to Istio's service registry. I use it when mesh workloads must call an external API, database, VM, or service that Istio cannot discover from Kubernetes Services.
Technical explanation
ServiceEntry lets Istio understand the host, ports, protocols, resolution mode, and endpoints for external services.
It is required in locked-down meshes when outbound traffic policy allows only registered external services.
It can be combined with VirtualService, DestinationRule, and egress gateway routing.
Hands-on example
Example external API:
apiVersion: networking.istio.io/v1
kind: ServiceEntry
metadata:
name: partner-api
spec:
hosts: [api.partner.com]
location: MESH_EXTERNAL
ports:
- number: 443
name: https
protocol: TLS
resolution: DNSCheck how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.
More Istio & Service Mesh interview questions
- What is the difference between an Istio ingress gateway and an egress gateway?
- How do you do weighted traffic splitting for a canary release in Istio?
- What is a Gateway resource, and how does it differ from a Kubernetes Ingress?
- What is a DestinationRule, and how does it relate to a VirtualService?
- How do you implement a blue-green deployment using Istio?
- What is a VirtualService, and what does it control?
- What are subsets in a DestinationRule, and how are they used?
- How does traffic flow through an Envoy sidecar for inbound and outbound requests?