@@ -593,7 +593,7 @@ In one terminal window, patch the `web` StatefulSet to change the container
593
593
image again:
594
594
595
595
``` shell
596
- kubectl patch statefulset web --type=' json' -p=' [{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.8 "}]'
596
+ kubectl patch statefulset web --type=' json' -p=' [{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.24 "}]'
597
597
```
598
598
```
599
599
statefulset.apps/web patched
@@ -661,9 +661,9 @@ Get the Pods to view their container images:
661
661
for p in 0 1 2; do kubectl get pod " web-$p " --template ' {{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ; echo ; done
662
662
```
663
663
```
664
- registry.k8s.io/nginx-slim:0.8
665
- registry.k8s.io/nginx-slim:0.8
666
- registry.k8s.io/nginx-slim:0.8
664
+ registry.k8s.io/nginx-slim:0.24
665
+ registry.k8s.io/nginx-slim:0.24
666
+ registry.k8s.io/nginx-slim:0.24
667
667
668
668
```
669
669
@@ -705,7 +705,7 @@ Patch the StatefulSet again to change the container image that this
705
705
StatefulSet uses:
706
706
707
707
``` shell
708
- kubectl patch statefulset web --type=' json' -p=' [{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.7 "}]'
708
+ kubectl patch statefulset web --type=' json' -p=' [{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.21 "}]'
709
709
```
710
710
```
711
711
statefulset.apps/web patched
@@ -740,7 +740,7 @@ Get the Pod's container image:
740
740
kubectl get pod web-2 --template ' {{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
741
741
```
742
742
```
743
- registry.k8s.io/nginx-slim:0.8
743
+ registry.k8s.io/nginx-slim:0.24
744
744
```
745
745
746
746
Notice that, even though the update strategy is ` RollingUpdate ` the StatefulSet
@@ -790,7 +790,7 @@ Get the Pod's container:
790
790
kubectl get pod web-2 --template ' {{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
791
791
```
792
792
```
793
- registry.k8s.io/nginx-slim:0.7
793
+ registry.k8s.io/nginx-slim:0.21
794
794
795
795
```
796
796
@@ -834,7 +834,7 @@ Get the `web-1` Pod's container image:
834
834
kubectl get pod web-1 --template ' {{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
835
835
```
836
836
```
837
- registry.k8s.io/nginx-slim:0.8
837
+ registry.k8s.io/nginx-slim:0.24
838
838
```
839
839
840
840
` web-1 ` was restored to its original configuration because the Pod's ordinal
@@ -892,9 +892,9 @@ Get the container image details for the Pods in the StatefulSet:
892
892
for p in 0 1 2; do kubectl get pod " web-$p " --template ' {{range $i, $c := .spec.containers}}{{$c.image}}{{end}}' ; echo ; done
893
893
```
894
894
```
895
- registry.k8s.io/nginx-slim:0.7
896
- registry.k8s.io/nginx-slim:0.7
897
- registry.k8s.io/nginx-slim:0.7
895
+ registry.k8s.io/nginx-slim:0.21
896
+ registry.k8s.io/nginx-slim:0.21
897
+ registry.k8s.io/nginx-slim:0.21
898
898
```
899
899
900
900
By moving the ` partition ` to ` 0 ` , you allowed the StatefulSet to
0 commit comments