fabric8io / elasticsearch-cloud-kubernetes

Other
169 stars 90 forks source link

Discovery by label on Elasticsearch 5.x #138

Closed ruippeixotog closed 6 years ago

ruippeixotog commented 6 years ago

I see that #98 added support for discovery by label - a thing that I need, since I'm using Deployments and I need the readiness check to be failing in order for the deployment not to kill all old instances as soon as the new ones boot.

However, I can't see the feature in the latest version of the plugin. Is there any limitation I'm not aware of? Can this be ported to ES 5.x?

jcantrill commented 6 years ago

It can. PRs are welcome. Also consider #94 where you may not even need this plugin

ruippeixotog commented 6 years ago

Using only zen discovery would be great! But what exactly would be the hostname I'd use to lookup all the pod IPs inside the cluster? ClusterIP services expose a hostname like elasticsearch.default.svc.cluster.local, but it points to a single IP - the IP of the service - from which requests are routed at the IP layer to the pod IPs.

jcantrill commented 6 years ago

https://kubernetes.io/docs/concepts/services-networking/service/#headless-services

ruippeixotog commented 6 years ago

Oh, nice! I'm still a beginner using Kubernetes and I never explored those types of services. They seem to do the trick for discovery, yeah. Will try them later. Thanks again!

jcantrill commented 6 years ago

@ruippeixotog see #140