Replacing Netflix Eureka with Kubernetes Services
As shown in the previous chapter, Chapter 15, Introduction to Kubernetes, Kubernetes comes with a built-in discovery service based on Kubernetes Service objects and the kube-proxy
runtime component. This makes it unnecessary to deploy a separate discovery Service such as Netflix Eureka, which we used in the previous chapters.
An advantage of using the Kubernetes discovery Service is that it doesn’t require a client library such as Spring Cloud LoadBalancer, which we have used together with Netflix Eureka. This makes the Kubernetes discovery Service easy to use, independent of which language or framework a microservice is based on.
A drawback of using the Kubernetes discovery Service is that it only works in a Kubernetes environment. However, since the discovery Service is based on kube-proxy
, which accepts requests to the DNS name or IP address of a Service object, it should be fairly simple to replace it with a similar...