website/content/en/examples/application
Taher Bohari 000aa4520e Update podManagementPolicy of StatefulSet object (#13210)
In given manifest, podManagementPolicy is set as Parallel, but in later section of page, the console logs of "kubectl get pods -w -l app=zk" command displays ordered behavior, which is not the actual result in case of Parallel option.

Sample logs from doc : 
NAME      READY     STATUS    RESTARTS   AGE
zk-0      0/1       Pending   0          0s
zk-0      0/1       Pending   0         0s
zk-0      0/1       ContainerCreating   0         0s
zk-0      0/1       Running   0         19s
zk-0      1/1       Running   0         40s
zk-1      0/1       Pending   0         0s
zk-1      0/1       Pending   0         0s
zk-1      0/1       ContainerCreating   0         0s
zk-1      0/1       Running   0         18s
zk-1      1/1       Running   0         40s
zk-2      0/1       Pending   0         0s
zk-2      0/1       Pending   0         0s
zk-2      0/1       ContainerCreating   0         0s
zk-2      0/1       Running   0         19s
zk-2      1/1       Running   0         40s

## here pods are created in order

Actual results after applying the given manifest : 
[taher@kubernetes-docker ~]$ kubectl apply -f zookeeper.yaml
service/zk-hs created
service/zk-cs created
poddisruptionbudget.policy/zk-pdb created
statefulset.apps/zk created
[taher@kubernetes-docker ~]$ kubectl get pods -w -l app=zk
NAME   READY   STATUS              RESTARTS   AGE
zk-0   0/1     Pending             0          3s
zk-1   0/1     Pending             0          3s
zk-2   0/1     ContainerCreating   0          3s
zk-1   0/1   Pending   0     4s
zk-0   0/1   Pending   0     4s
zk-1   0/1   Pending   0     5s
zk-0   0/1   Pending   0     5s
zk-1   0/1   Pending   0     5s
zk-1   0/1   ContainerCreating   0     5s
zk-0   0/1   Pending   0     5s
zk-2   0/1   Running   0     19s
zk-1   0/1   Running   0     24s
zk-2   1/1   Running   0     35s
zk-1   1/1   Running   0     37s

## here pods are created in parallel

Resolution :
Either change the value of podManagementPolicy option to OrderedReady or remove that option, so that StatefulSet will take it's default behavior.
2019-04-09 22:32:12 -07:00
..
cassandra Fix cassandra-statefulset.yaml indent level (#10243) 2018-09-10 02:05:52 -07:00
guestbook Consolidate YAML files [part-5] (#9258) 2018-07-02 13:06:18 -07:00
hpa Consolidate YAML files [part-3] (#9237) 2018-07-02 11:15:20 -07:00
job Update worker.py (#12403) 2019-01-28 11:44:01 -08:00
mysql Consolidate YAML files [part-3] (#9237) 2018-07-02 11:15:20 -07:00
nginx Consolidate YAML files [part-15] (#9380) 2018-07-10 09:09:26 -07:00
web Consolidate YAML files [part-6] (#9261) 2018-07-02 13:37:18 -07:00
wordpress Consolidate YAML files [part-6] (#9261) 2018-07-02 13:37:18 -07:00
zookeeper Update podManagementPolicy of StatefulSet object (#13210) 2019-04-09 22:32:12 -07:00
deployment-patch.yaml Consolidate YAML files [part-3] (#9237) 2018-07-02 11:15:20 -07:00
deployment-scale.yaml Consolidate YAML files [part-2] (#9236) 2018-06-26 09:34:52 -07:00
deployment-update.yaml Consolidate YAML files [part-2] (#9236) 2018-06-26 09:34:52 -07:00
deployment.yaml Consolidate YAML files [part-8] (#9347) 2018-07-02 17:35:20 -07:00
nginx-app.yaml Consolidate YAML files [part-15] (#9380) 2018-07-10 09:09:26 -07:00
nginx-with-request.yaml Consolidate YAML files [part-4] (#9241) 2018-07-02 11:17:19 -07:00
shell-demo.yaml Consolidate YAML files [part-4] (#9241) 2018-07-02 11:17:19 -07:00
simple_deployment.yaml Consolidate YAML files [part-13] (#9377) 2018-07-10 08:56:25 -07:00
update_deployment.yaml Consolidate YAML files [part-13] (#9377) 2018-07-10 08:56:25 -07:00