Moving to Kubernetes

Kubernetes began with a group of Google developers from a previous Google system called Borg. Its goal was, and is, to help in the deployment, scaling, and maintenance of applications. When it was first announced in 2014, there was no open source alternative. At the time, there was no Docker swarm, Docker networks, or Docker services.

Let's see what changes we need to make to our microservice in order to successfully run it using Kubernetes. But first, we need to clarify some of the concepts that are used in Kubernetes:

  • Pods: A Pod consists of one or more containers that share some resources, and because of that, need to be located on the same host. A Pod is assigned a unique network address to avoid port collision. Note that several Pods of your deployment may be created, each with a different address.
  • Labels: Kubernetes allows us to assign several labels to Pods in order to create groups of different kinds of components, such as frontend and backend, production and staging.
  • Services: A Service is a group of Pods that work together, like our microservice and the database server. You can create a Service by defining a Label of Pods.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset