rollingupdate-statefulset.yaml 556 B

1234567891011121314151617181920212223242526272829
  1. apiVersion: apps/v1beta2
  2. kind: StatefulSet
  3. metadata:
  4. name: nginx
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: nginx-statefulset
  9. updateStrategy:
  10. type: RollingUpdate
  11. serviceName: "nginx"
  12. replicas: 0
  13. template:
  14. metadata:
  15. labels:
  16. app: nginx-statefulset
  17. spec:
  18. terminationGracePeriodSeconds: 5
  19. containers:
  20. - name: nginx
  21. image: k8s.gcr.io/nginx-slim:0.7
  22. ports:
  23. - containerPort: 80
  24. name: web
  25. command:
  26. - sh
  27. - -c
  28. - 'while true; do sleep 1; done'