Chapter 4. Replication and other controllers: deploying managed pods

 

This chapter covers

  • Keeping pods healthy
  • Running multiple instances of the same pod
  • Automatically rescheduling pods after a node fails
  • Scaling pods horizontally
  • Running system-level pods on each cluster node
  • Running batch jobs
  • Scheduling jobs to run periodically or once in the future

As you’ve learned so far, pods represent the basic deployable unit in Kubernetes. You know how to create, supervise, and manage them manually. But in real-world use cases, you want your deployments to stay up and running automatically and remain healthy without any manual intervention. To do this, you almost never create pods directly. Instead, you create other types of resources, such as ReplicationControllers or Deployments, which then create and manage the actual pods.

4.1. Keeping pods healthy

 
 

4.1.1. Introducing liveness probes

 
 

4.1.2. Creating an HTTP-based liveness probe

 
 

4.1.3. Seeing a liveness probe in action

 
 
 

4.1.4. Configuring additional properties of the liveness probe

 
 
 

4.1.5. Creating effective liveness probes

 

4.2. Introducing ReplicationControllers

 
 
 

4.2.1. The operation of a ReplicationController

 
 
 

4.2.2. Creating a ReplicationController

 
 
 
 

4.2.3. Seeing the ReplicationController in action

 

4.2.4. Moving pods in and out of the scope of a ReplicationController

 
 
 

4.2.5. Changing the pod template

 
 

4.2.6. Horizontally scaling pods

 
 
 

4.2.7. Deleting a ReplicationController

 
 
 

4.3. Using ReplicaSets instead of ReplicationControllers

 
 
 

4.3.1. Comparing a ReplicaSet to a ReplicationController

 
 
 

4.3.2. Defining a ReplicaSet

 
 

4.3.3. Creating and examining a ReplicaSet

 
 
 

4.3.4. Using the ReplicaSet’s more expressive label selectors

 
 

4.3.5. Wrapping up ReplicaSets

 
 
 
 

4.4. Running exactly one pod on each node with DaemonSets

 
 
 

4.4.1. Using a DaemonSet to run a pod on every node

 

4.4.2. Using a DaemonSet to run pods only on certain nodes

 
 

4.5. Running pods that perform a single completable task

 
 

4.5.1. Introducing the Job resource

 
 
 

4.5.2. Defining a Job resource

 
 

4.5.3. Seeing a Job run a pod

 
 
 
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