How does the demo app find kv by its hostname?
Three pieces allow the demo app to reach kv by a hostname:
- The control plane generated a
MeshServicenamedkv, and allocated a VIP and thekv.svc.mesh.localhostname. - The
demo-appDataplanelistskvinreachableBackends, so the control plane configures the proxy with an outbound for it. kuma-dpis running with transparent proxying and the embedded DNS proxy, so the application’s DNS lookups resolve mesh hostnames and the sidecar intercepts its outbound traffic.
How does a workload reach another one without transparent proxying?
Without transparent proxying, the sidecar doesn’t intercept outbound traffic, so each
destination needs an explicit outbound in the caller’s Dataplane that binds a local port:
networking:
address: 172.18.78.3
inbound:
- port: 5050
name: main
protocol: http
outbound:
- port: 10001
backendRef:
kind: MeshService
name: kv
port: 5050The application then connects to 127.0.0.1:10001 instead of kv.svc.mesh.local.
backendRef is required and needs name or labels.