question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create a Discovery Controller that adds service/instance information in config maps

See original GitHub issue

To eliminate the need for the application to be able to access the K8S API server we should provide a ServiceDiscovery implementation that does not rely on the use of the API.

We could do this by just leveraging the platform service discovery and then fetch the port via a lookup.

Another option would be to implement a service discovery server which exclusively talks to the k8s api server and have clients fetch service information from this server (kind of like a eureka server).

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
markfishercommented, Nov 12, 2019

I think the best way to do this (without the Pod contacting the API) would be to provide a Kubernetes controller that uses a shared Informer to capture all the events about services and act as a ServiceRegistry.

I agree, but I would first explore the ecosystem for existing projects. I would also expect that implementing an Informer-driven ServiceRegistry would be simpler/lighter in Go.

0reactions
spencergibbcommented, Mar 5, 2021

https://github.com/scratches/spring-controller (native, config maps) and https://github.com/Haybu/spring-cloud-k8s-eureka-controller (discovery) can be useful proofs of concept to take from.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Cloud Kubernetes
Discovery Client implementation that resolves service names to Kubernetes ... Another option is to create a different config map per profile and spring...
Read more >
Service Discovery, ConfigMap & Ingress Controller
So, here I am going to explain you in detail about the Service Discovery using DNS as of Kubernetes 1.3. DNS is a...
Read more >
spring-cloud-kubernetes/readme.md at master - GitHub
This project provides integration with ConfigMap to make config maps accessible by spring boot. The ConfigMap PropertySource when enabled will lookup Kubernetes ...
Read more >
Configure a Pod to Use a ConfigMap - Kubernetes
Create ConfigMaps from files · kubectl create configmap game-config-2 --from-file=configure-pod-container/configmap/game. · kubectl describe ...
Read more >
Service Discovery in a Microservices Architecture - NGINX
In order to make a request, your code needs to know the network location (IP address and port) of a service instance. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found