NinesStack / sidecar

Gossip-based service discovery. Docker native, but supports non-container discovery, too.
MIT License
69 stars 7 forks source link

Simple K8s API discovery method #68

Closed relistan closed 1 year ago

relistan commented 1 year ago

This PR is a really simple attempt to build a discovery method that allows bridging between a Sidecar cluster and a Kubernetes cluster that has been configured to have a load balancer in front of it that matches the expected ports in the Sidecar cluster. This is useful for e.g. moving services from a Mesos cluster to a Kubernetes clusters and still being able to access them in the original cluster.

This implemenation use calls to the Kubernetes REST API using authentication provided from a token and ca.crt file as commonly mounted by Kubernetes for all pods. This is to get around loading the gigantic Kubernetes client library into sidecar and then having to maintain that.