Scaling Deployments

In this lesson, we will learn to scale deployments using a YAML file and will discuss automated scaling briefly.

Scaling Using YAML Files

There are quite a few different ways we can scale Deployments. Everything we do in this section is not unique to Deployments and can be applied to any Controller, like ReplicaSet, and those we did not yet explore.

If we decide that the number of replicas changes with relatively low frequency or that Deployments are performed manually, the best way to scale is to write a new YAML file or, even better, modify the existing one. Assuming that we store YAML files in a code repository, by updating existing files we have a documented and reproducible definition of the objects running inside a cluster.

We already performed scaling when we applied the definition from the go-demo-2-scaled.yml. We’ll do something similar, but with Deployments.

Looking into the File

Let’s take a look at deploy/go-demo-2-scaled.yml.

Get hands-on with 1200+ tech skills courses.