This chapter covers:
- Pods and other Kubernetes objects
- Kubernetes Deployments: the common sources of Pod objects
- The schema of various Kubernetes objects in the form of YAML
- Pod Priorities
If you understand the concept of Pods, Deployments, and the basic Kubernetes API patterns, you probably can skip over this chapter, but it is not a long read, and you may glean something new. Pods are the atomic unit of execution in Kubernetes, and we’ve mentioned before that they are a significant differentiator between Kubernetes and its predecessor runtimes, like Mesos, Docker Swarm, and cloud container execution environments such as Amazon’s Elastic Container Service (ECS). As abstractions such as Helm charts and operators become more commonplace, it is easy to overlook the fact that Pods can manifest through many different pathways in the Kubernetes API. If you’ve ever wondered whether a Deployment, StatefulSet, or DaemonSet was the ideal solution for your distributed app, this is the chapter for you.
There are several different higher-level controllers in Kubernetes that create and manage Pod lifecycles. The most common source of Pods in a Kubernetes cluster is a Deployment, so we’ll cover that first. Then we’ll go through StatefulSets and DaemonSets, which are essential for various types of critical workloads in your cluster.