July 2019
Intermediate to advanced
502 pages
14h
English
The default deployment strategy is RollingUpdate:
$ kubectl get deployment social-graph-manager -o yaml | grep strategy -A 4 strategy: rollingUpdate: maxSurge: 25% maxUnavailable: 25% type: RollingUpdate
Rolling updates work as follows: the total number of pods (old and new) is going to be the current replica count, plus the max surge. The deployment controller will start replacing old pods with new pods, making sure not to exceed the limit. The max surge can be an absolute number, such as 4, or a percentage, such as 25%. For example, if the number of replicas for the deployment is 4 and the max surge is 25%, then an additional new pod can be added, and one of the old pods can be terminated. maxUnavailable is the number of ...