6 Scaling applications across multiple Pods with Controllers
The basic idea for scaling applications is simple: run more Pods. Kubernetes abstracts networking and storage away from the compute layer, so you can run many Pods which are copies of the same app, and just plug them into the same abstractions. Kubernetes calls those Pods replicas, and in a multi-node cluster they'll be distributed across many nodes. That gives you all the benefits of scale - greater capacity to handle load, and high availability in case of failure - all in a platform which can scale up and down in seconds.
Kubernetes provides some alternative scaling options to meet different application requirements, and we'll work through them all in this chapter. The one you'll use most often is the Deployment controller, which is actually the simplest - but we'll spend time on the others too so you understand how to scale different types of applications in your cluster.
6.1 How Kubernetes runs apps at scale
The Pod is the unit of compute in Kubernetes, and you learned in chapter 2 that you don't usually run Pods directly; instead you define another resource to manage them for you. That resource is a controller, and we've used Deployment controllers ever since. A controller spec includes a Pod template which it uses to create and replace Pods - and it can use that same template to create many replicas of a Pod.