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:

  1. Use service discovery to automatically detect services
  2. Enable transparent proxying for automatic traffic interception
  3. Configure DNS for hostname-based service resolution
  4. Apply routing policies with MeshHTTPRoute or MeshTCPRoute

External service integration

To connect mesh services with external dependencies:

  1. Define external services using MeshExternalService
  2. Configure non-mesh traffic policies for passthrough or direct access
  3. Use MeshPassthrough policy to control traffic to external destinations

Multi-zone service communication

For services across multiple zones:

  1. Deploy multi-zone topology
  2. Use MeshMultiZoneService to define cross-zone services
  3. Configure Zone Ingress for inter-zone communication
  4. Optionally configure Zone Egress for external traffic

Networking works in conjunction with these policies:

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