Scaling Deployments

Scaling using YAML files

There are quite a few different ways we can scale Deployments. Everything we’ll do in this section is not unique to Deployments and can be applied to any controller (like ReplicaSet).

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 file. We’ll do something similar here, but with Deployments.

Looking into the file

Get hands-on with 1400+ tech skills courses.