website/content/en/examples
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
..
admin fix indentaion in hpa deployment (#12893) 2019-03-07 16:50:03 -08:00
application Update podManagementPolicy of StatefulSet object (#13210) 2019-04-09 22:32:12 -07:00
audit audit api version has been updated to v1 (#10647) 2018-10-17 00:48:05 -07:00
configmap Test examples files in configmap directory (#13128) 2019-03-14 06:44:23 -07:00
controllers Update fluentd image (#13661) 2019-04-07 20:34:24 -07:00
debug bump version of event-exporter (#10191) 2018-10-03 19:19:30 -07:00
federation Consolidate YAML files [part-15] (#9380) 2018-07-10 09:09:26 -07:00
minikube Update Dockerfile (#10441) 2018-10-03 17:28:52 -07:00
podpreset Modify indent from 3 to 2 spaces (#13056) 2019-03-12 11:26:44 -07:00
pods Fixes `runAsGroup` security context example (#13535) (#13538) 2019-04-09 18:56:12 -07:00
policy Consolidate YAML files [part-8] (#9347) 2018-07-02 17:35:20 -07:00
service Consolidate YAML files [part-13] (#9377) 2018-07-10 08:56:25 -07:00
windows Consolidate YAML files [part-14] (#9379) 2018-07-03 23:58:20 -07:00
README.md Improve examples test (#9467) 2018-07-11 08:43:25 -07:00
examples.go Improve examples test (#9467) 2018-07-11 08:43:25 -07:00
examples_test.go Test examples files in configmap directory (#13128) 2019-03-14 06:44:23 -07:00

README.md

Note: These tests are importing code from kubernetes that isn't really meant to be used outside the repo. This causes vendoring problems. As a result, we have to work around those with these lines in the travis config:

- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/apimachinery
- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/apiserver
- rm $GOPATH/src/k8s.io/kubernetes/vendor/k8s.io/client-go
- cp -r $GOPATH/src/k8s.io/kubernetes/vendor/* $GOPATH/src/
- rm -rf $GOPATH/src/k8s.io/kubernetes/vendor/*
- cp -r $GOPATH/src/k8s.io/kubernetes/staging/src/* $GOPATH/src/