Deploying via Kubernetes
In this section, we are going to illustrate how to set up deployments for our microservices using Kubernetes. You will learn the basics of Kubernetes, how to set up our microservices for using it, and how to test our microservice deployments in Kubernetes.
Introduction to the Kubernetes data model
In Kubernetes, each application consists of one or multiple Pods – the smallest deployable units. Each Pod contains one or multiple containers – lightweight software blocks containing the application code. The deployment of a single container to multiple Pods is illustrated in the following diagram:

Figure 8.1 – Kubernetes deployment model
Kubernetes Pods can be run on one or multiple hosts, called nodes. A group of nodes is called a cluster, and the relationship between a cluster, nodes, and its Pods is illustrated in the following diagram:

Figure 8.2 – Kubernetes cluster model
To deploy a service in...