July 2019
Intermediate to advanced
502 pages
14h
English
Each pod in a StatefulSet gets an ordinal index. But, what is this for? Well, some data stores rely on the orderly sequence of initialization. The StatefulSet ensures that when the StatefulSet pods are initialized, scaled up, or scaled down, it is always done in order.
In Kubernetes 1.7, the orderliness restriction was relaxed. For data stores that don't require orderliness, it makes sense to allow for parallel operations on multiple pods in the StatefulSet. This can be specified in the podPolicy field. The values allowed are OrderedReady for the default orderly behavior, or parallel for the relaxed parallel mode, where pods can be launched or terminated while other pods are still launching or terminating.