When you use Kubernetes, do you really need another Service Discovery or an API Gateway Solution inside kubernetes?

11/18/2019

We have started using kubernetes recently. We are actively migrating from Docker Swarm clusters to Kubernetes on a two master HA cluster and around 8 slave nodes. 4 each to a master. We use Spring Boot for our services, and Spring advises us to use Spring Cloud Gateway.
Eventhough kubernetes site says they provide Service Discovery and Load Balancing mechanisms, why there are a lot of offerings to use on Kubernetes.
Do they provide any better offering than kubernetes? Or if we use other providers are we introducing any latency on top of what kubernetes offers? Does a drill down route happens when we use other providers? I mean other provider does discovery and kubernetes again does another round of discovery within its cluster?

-- Srini M
docker
kubernetes
kubernetes-pod

1 Answer

11/18/2019

The short and unsatisfying answer: Don't sweat it.

Use vanilla Kubernetes as long as you can. Any deviation introduces additional complexity that you need to manage. If that's worth it in your case, go ahead ;)

What do I mean by that? Well, it seems you are more or less at the beginning of your journey even though you already have a swarm cluster. So focus on the immediate issues at hand, e.g. migrating to Kubernetes, and not something that might be helpful in the distant future.

An API gateway, for example, will become beneficial in the future once your architecture has matured and you need to e.g. support multiple versions of your API. But that does not mean, that you need to introduce an API Gateway right from get-go.

-- ckaserer
Source: StackOverflow