Microservices in Docker Container Microservices in Docker Container docker docker

Microservices in Docker Container


Even when you use Spring Cloud, 100 services do NOT mean 100 servers. In Spring Cloud the packaging unit is Spring Boot application and a single server may host many such Spring Boot applications. If you want, you can containerize the Spring Boot applications and other Spring Cloud infrastructure support components. But that is not Kubernetes.

If you move to Kubernetes, you don't need the infrastructure support services like Zuul, Ribbon etc. because Kubernetes has its own components for service discovery, gateway, load balancer etc. In Kubernetes, the packaging unit is Docker images and one or more Docker containers can be put inside one pod which is the minimal scaling unit. So, Kubernetes has a different set of components to manage the Microservices.

Kubernetes is a different platform than Spring cloud. Both have the same objectives. However, Kubernetes has some additional features like self healing, auto-scaling, rolling updates, compute resource management, deployments etc.


Just to add to saptarshi basu's answer, you might want to look at https://dzone.com/articles/deploying-microservices-spring-cloud-vs-kubernetes as it walks through the comparison and asks which responsibilities you might want to be handled by which components when using Spring cloud on kubernetes