concept pod in category docker

This is an excerpt from Manning's book Bootstrapping Microservices with Docker, Kubernetes and Terraform MEAP V08.
Each node hosts multiple pods. The arrangement of nodes and pods is illustrated in figure 6.3. The depicted cluster has three nodes - it is powered by three VMs. However the cluster we create in this chapter only has a single node, that’s because our simple application doesn’t need much computing power. It also means we won’t be paying for more VMs than we actually need. Scaling up to more nodes is easy though and we’ll look at a real example in Chapter 11: Pathways to scalability.
A pod is the basic unit of execution in Kubernetes and can host multiple containers as shown in figure 6.4. This can be the basis for many architectural patterns such as the sidecar pattern for proxies and authentication. In this book though we are keeping things simple and we’ll only be deploying a single container to each pod.
We first met Kubectl in chapter 6, we’ll use it again now to get logs from a particular container running on Kubernetes. Let’s say we are running FlixTube as it was at the end of chapter 9 (you can do this and follow along if you like). Imagine that we’d like to get logging from an instance of our metadata microservice.
What we are actually looking for here is the name of the pod. You might remember from chapter 6 that a Kubernetes pod is the thing that contains our containers, a pod can actually run multiple containers, even though as yet for FlixTube we are only running a single container per pod.
After authenticating Kubectl as described in section 6.12.1 from chapter 6, now use the get pods command to see the full list of pods in our cluster:
![]()
Scan down the list to pick out the name of the pod for our metadata microservice and find its unique name. In this case the name is metadata-55bb6bdf58-7pjn2.