The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

David M. Karr (83) [Avatar] Offline
In section "11.1.6. Introducing the controllers running in the Controller Manager ", I found the following sentence:

The Deployment controller performs a rollout of a new version each time a Deployment object is modified (if the modification should affect the deployed pods). It does this by creating a ReplicaSet and then appropriately scaling both the old and the new ReplicaSet based...

Is this true? If this is not a misstatement, what would it change in the old ReplicaSet?
Marko Lukša (70) [Avatar] Offline
It scales down the old ReplicaSet, while scaling up the new one. Depending on the update strategy, this process is performed like this:
- Rolling update strategy: increase the desired replica count in the new RS by e.g. 1, then decrease replica count on old RS by 1, then again increase new the new RS count by 1, and so on, until the old RS reaches zero.
- Replace strategy: set desired replica count on old RS to zero, then set replica count on new RS to replica count set on the Deployment object

The Deployment controller code that does the rolling update is here:
David M. Karr (83) [Avatar] Offline
Ah, right. The deployment is a stepwise transition from old to new.