
- #Building microservice systems with docker and kubernetes how to
- #Building microservice systems with docker and kubernetes code
- #Building microservice systems with docker and kubernetes series
The detailed instruction for Minishift may be found there: Quick guide to deploying Java apps on OpenShift. You should start it and expose the embedded Docker client provided by both of them. You need at least a single node cluster instance of Kubernetes ( Minikube) or Openshift ( Minishift) running on your local machine.We can realize that in the following steps: In order to be able to deploy and test our sample microservices we need to prepare a development environment.
#Building microservice systems with docker and kubernetes code
The source code of sample Spring Boot microservices on Kubernetes presented in this article is available on GitHub in repository. Because we use Spring Boot 2.0 we have to include the newest SNAPSHOT version of spring-cloud-kubernetes artifacts, which is 0.3.0.BUILD-SNAPSHOT. So, we need to explicitly define its version. Spring Cloud Kubernetes is not released under Spring Cloud Release Trains. This version of spring-cloud-dependencies should be declared as a BOM for dependency management. Currently, the newest stable version of Spring Cloud is Finchley.RELEASE. These Spring Boot microservices use some build-in mechanisms provided by Kubernetes: config maps and secrets for distributed configuration, etcd for service discovery, and ingresses for API gateway. There are three independent applications ( employee-service, department-service, organization-service), which communicate between each other through REST API.

It is quite similar to the architecture presented in the already mentioned article about microservices on Spring Cloud. It illustrates the architecture of our sample system.
#Building microservice systems with docker and kubernetes how to
I’ll show you how to use the implementation of discovery client, inter-service communication with Ribbon client, and Zipkin discovery using Spring Cloud Kubernetes.īefore we proceed to the source code, let’s take a look at the following diagram. It integrates Spring Cloud with Kubernetes. Although it is still in the incubation stage it is definitely worth dedicating some time to it.

The one really interesting project that helps us in development is Spring Cloud Kubernetes ( ).

But even if you decide to use Kubernetes components instead of Spring Cloud you can take advantage of some interesting features provided throughout the whole Spring Cloud project. Such components like Eureka, Spring Cloud Config, or Zuul provided by Spring Cloud may be replaced by built-in Kubernetes objects like services, config maps, secrets, or ingresses. Spring Cloud and Kubernetes may be threatened as competitive solutions when you build microservices environments.
#Building microservice systems with docker and kubernetes series
Here’s the next article in a series of “Quick Guide to…”.
