Careful!
You are browsing documentation for the next version of Kuma. Use this version at your own risk.
Service Discovery & Networking
Kuma provides a comprehensive networking layer that handles service discovery, DNS resolution, traffic routing, and connectivity between services in your mesh. This section covers how services communicate with each other and with external systems.
Service discovery
Understand how Kuma discovers and tracks services:
- Service discovery overview - How Kuma automatically discovers services in Kubernetes and Universal modes
- MeshService - Define services within your mesh for more granular control and cross-zone communication
- MeshMultiZoneService - Configure services that span multiple zones in multi-zone deployments
- MeshExternalService - Integrate external services (databases, APIs, third-party services) into your mesh
DNS and hostname resolution
Configure DNS for service-to-service communication:
- DNS - Built-in DNS server for service name resolution within the mesh
- HostnameGenerator - Customize DNS hostname generation for services
Traffic interception and proxying
Control how traffic flows through the mesh:
- Transparent proxying - Automatically intercept application traffic without code changes or configuration
- Non-mesh traffic - Handle traffic to and from services outside the mesh, including passthrough and direct access
Common networking patterns
Internal service communication
For services communicating within the mesh:
- Use service discovery to automatically detect services
- Enable transparent proxying for automatic traffic interception
- Configure DNS for hostname-based service resolution
- Apply routing policies with MeshHTTPRoute or MeshTCPRoute
External service integration
To connect mesh services with external dependencies:
- Define external services using MeshExternalService
- Configure non-mesh traffic policies for passthrough or direct access
- Use MeshPassthrough policy to control traffic to external destinations
Multi-zone service communication
For services across multiple zones:
- Deploy multi-zone topology
- Use MeshMultiZoneService to define cross-zone services
- Configure Zone Ingress for inter-zone communication
- Optionally configure Zone Egress for external traffic
Related policies
Networking works in conjunction with these policies:
- MeshHTTPRoute - Route and manipulate HTTP traffic between services
- MeshTCPRoute - Route TCP traffic to backend services
- MeshLoadBalancingStrategy - Configure load balancing algorithms
- MeshPassthrough - Control passthrough traffic to external destinations
- MeshTrafficPermission - Define which services can communicate
Next steps
- Start with basics: Understand service discovery and how Kuma tracks services
- Enable transparent proxying: Configure transparent proxying to intercept traffic automatically
- Set up DNS: Use DNS for hostname-based service resolution
- Add external services: Define MeshExternalService resources for dependencies outside the mesh