What reason is there for using service discovery instead of Kubernetes internal dns

10/31/2018

What is the reasoning for using service discovery like Consul instead of Kubernetes internal DNS, like my-svc.my-namespace.svc.cluster.local? I am wondering because I am starting on a fairly large project and want to make sure I'm not setting myself up for failure using the build in Kubernetes DNS.

-- Ryan McCue
kubernetes
service-discovery

1 Answer

10/31/2018

The service discovery by DNS name itself (inside the cluster) is somehow similar.

Other technologies are adding more functionality to the stack like: Encrypted Traffic, Connection Authorization, Proxy Sidecars, etc

You can take a look here: https://www.hashicorp.com/blog/consul-1-2-service-mesh as an example.

Those frameworks will help reduce code on each container (example: retry/circuit breaker) by adding this 'plumbling' at the service level.

--M

-- Marcus Vinícius Soares
Source: StackOverflow