2 Running containers in Kubernetes with Pods and Deployments

 

Kubernetes runs containers for your application workloads, but the containers themselves are not objects you need to work with. Every container belongs to a Pod, which is a Kubernetes object for managing one or more containers, and Pods, in turn, are managed by other resources. These higher-level resources abstract away the details of the container, which powers self-healing applications and lets you use a desired-state workflow: you tell Kubernetes what you want to happen, and it decides how to make it happen.

In this chapter, we’ll get started with the basic building blocks of Kubernetes: Pods, which run containers, and Deployments, which manage Pods. We’ll use a simple web app for the exercises, and you’ll get hands-on experience using the Kubernetes command-line tool to manage applications and using the Kubernetes YAML specification to define applications.

2.1 How Kubernetes runs and manages containers

A container is a virtualized environment that typically runs a single application component. Kubernetes wraps the container in another virtualized environment: the Pod. A Pod is a unit of compute, which runs on a single node in the cluster. The Pod has its own virtual IP address, which is managed by Kubernetes, and Pods in the cluster can communicate with other Pods over that virtual network, even if they’re running on different nodes.

2.2 Running Pods with controllers

 
 
 

2.3 Defining Deployments in application manifests

 
 

2.4 Working with applications in Pods

 
 
 
 

2.5 Understanding Kubernetes resource management

 
 
 

2.6 Lab

 
 
sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest