Updating Multiple Deployments
Learn how to update multiple Deployments at a time.
The use of selector labels
Even though most of the time we send requests to specific objects, almost everything is happening using selector labels. Previously, when we updated the Deployments, they looked for matching selectors to choose which ReplicaSets to create and scale. They, in turn, created or terminated Pods using the matching selectors.
Note: Almost everything in Kubernetes is operated using label selectors. It’s just that sometimes this phenomenon is obscured from us.
We do not have to update an object only by specifying its name or the YAML file where its definition resides. We can also use labels to decide which object should be updated. That opens some interesting possibilities since the selectors might match multiple objects.
Defining the Deployment
Let’s suppose that we’re running several Deployments with Mongo databases and that the time has come to update them to a newer release. Before we explore how we can do that, let’s create another Deployment so that we have at least two with the database Pods
Get hands-on with 1400+ tech skills courses.