Creating Pods and Services
In this section, we will learn about the resources we will use in the Kubernetes orchestration platform to deploy our applications. We will start by learning how containers are implemented inside Pods.
Pods
A Pod is the smallest scheduling unit in Kubernetes. We can include in a Pod multiple containers, and they will always share a uniquely defined IP address within the cluster. All containers inside a Pod will resolve localhost
; hence, we can only use ports once. Volumes associated with a Pod are also shared between containers. We can consider a Pod as a small VM in which different processes (containers) run together. Pods are considered in a healthy state when all their containers run correctly.
As Pods can contain many containers, we can think of using a Pod to deploy applications with multiple components. All containers associated with a Pod run on the same cluster host. This way, we can ensure that all application components run together, and...