tczekajlo / kube-consul-register

a tool to register Kubernetes PODs as Consul Services
Apache License 2.0
105 stars 50 forks source link

How do pods perform service discovery? #15

Closed raffian closed 5 years ago

raffian commented 7 years ago

We're experimenting with registration on kubernetes, but looking at this tool as alternative. Some questions:

tczekajlo commented 6 years ago

Not really. I recommend using replica set or deployment resource for kube-consul-register.

Pods or being more precise applications connect to Consul Agent. In a case when you use single Consul Agent it's pretty easy, all applications will connect to one consul agent. Another an example is a case when you have consul agent in a pod as a container. It's still simple, you can use localhost as Consul address. Last option is having consul agent on each node. In this approaching, it's good to create service for consul agent and application can use an internal address of service.