Modify registry.k8s.io/nginx-slim version from 0.8 to 0.24
This commit is contained in:
parent
fb6bf498ca
commit
e9c7b069d5
|
@ -101,7 +101,7 @@ spec:
|
||||||
terminationGracePeriodSeconds: 10
|
terminationGracePeriodSeconds: 10
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: registry.k8s.io/nginx-slim:0.8
|
image: registry.k8s.io/nginx-slim:0.24
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: web
|
name: web
|
||||||
|
|
|
@ -593,7 +593,7 @@ In one terminal window, patch the `web` StatefulSet to change the container
|
||||||
image again:
|
image again:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.8"}]'
|
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.24"}]'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
statefulset.apps/web patched
|
statefulset.apps/web patched
|
||||||
|
@ -661,9 +661,9 @@ Get the Pods to view their container images:
|
||||||
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
registry.k8s.io/nginx-slim:0.8
|
registry.k8s.io/nginx-slim:0.24
|
||||||
registry.k8s.io/nginx-slim:0.8
|
registry.k8s.io/nginx-slim:0.24
|
||||||
registry.k8s.io/nginx-slim:0.8
|
registry.k8s.io/nginx-slim:0.24
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -705,7 +705,7 @@ Patch the StatefulSet again to change the container image that this
|
||||||
StatefulSet uses:
|
StatefulSet uses:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.7"}]'
|
kubectl patch statefulset web --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.k8s.io/nginx-slim:0.21"}]'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
statefulset.apps/web patched
|
statefulset.apps/web patched
|
||||||
|
@ -740,7 +740,7 @@ Get the Pod's container image:
|
||||||
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
registry.k8s.io/nginx-slim:0.8
|
registry.k8s.io/nginx-slim:0.24
|
||||||
```
|
```
|
||||||
|
|
||||||
Notice that, even though the update strategy is `RollingUpdate` the StatefulSet
|
Notice that, even though the update strategy is `RollingUpdate` the StatefulSet
|
||||||
|
@ -790,7 +790,7 @@ Get the Pod's container:
|
||||||
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
kubectl get pod web-2 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
registry.k8s.io/nginx-slim:0.7
|
registry.k8s.io/nginx-slim:0.21
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -834,7 +834,7 @@ Get the `web-1` Pod's container image:
|
||||||
kubectl get pod web-1 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
kubectl get pod web-1 --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
registry.k8s.io/nginx-slim:0.8
|
registry.k8s.io/nginx-slim:0.24
|
||||||
```
|
```
|
||||||
|
|
||||||
`web-1` was restored to its original configuration because the Pod's ordinal
|
`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:
|
||||||
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
for p in 0 1 2; do kubectl get pod "web-$p" --template '{{range $i, $c := .spec.containers}}{{$c.image}}{{end}}'; echo; done
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
registry.k8s.io/nginx-slim:0.7
|
registry.k8s.io/nginx-slim:0.21
|
||||||
registry.k8s.io/nginx-slim:0.7
|
registry.k8s.io/nginx-slim:0.21
|
||||||
registry.k8s.io/nginx-slim:0.7
|
registry.k8s.io/nginx-slim:0.21
|
||||||
```
|
```
|
||||||
|
|
||||||
By moving the `partition` to `0`, you allowed the StatefulSet to
|
By moving the `partition` to `0`, you allowed the StatefulSet to
|
||||||
|
|
|
@ -30,7 +30,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: registry.k8s.io/nginx-slim:0.8
|
image: registry.k8s.io/nginx-slim:0.24
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: web
|
name: web
|
||||||
|
|
|
@ -29,7 +29,7 @@ spec:
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: nginx
|
- name: nginx
|
||||||
image: registry.k8s.io/nginx-slim:0.7
|
image: registry.k8s.io/nginx-slim:0.21
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: web
|
name: web
|
||||||
|
|
Loading…
Reference in New Issue