[go: nahoru, domu]

Skip to content

Commit

Permalink
Modify registry.k8s.io/nginx-slim version from 0.8 to 0.24
Browse files Browse the repository at this point in the history
  • Loading branch information
shayaniox committed Jun 4, 2024
1 parent fb6bf49 commit e9c7b06
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ spec:
terminationGracePeriodSeconds: 10
containers:
- name: nginx
image: registry.k8s.io/nginx-slim:0.8
image: registry.k8s.io/nginx-slim:0.24
ports:
- containerPort: 80
name: web
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ In one terminal window, patch the `web` StatefulSet to change the container
image again:

```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
Expand Down Expand Up @@ -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
```
```
registry.k8s.io/nginx-slim:0.8
registry.k8s.io/nginx-slim:0.8
registry.k8s.io/nginx-slim:0.8
registry.k8s.io/nginx-slim:0.24
registry.k8s.io/nginx-slim:0.24
registry.k8s.io/nginx-slim:0.24
```

Expand Down Expand Up @@ -705,7 +705,7 @@ Patch the StatefulSet again to change the container image that this
StatefulSet uses:

```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
Expand Down Expand Up @@ -740,7 +740,7 @@ Get the Pod's container image:
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
Expand Down Expand Up @@ -790,7 +790,7 @@ Get the Pod's container:
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
```

Expand Down Expand Up @@ -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}}'
```
```
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
Expand Down Expand Up @@ -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
```
```
registry.k8s.io/nginx-slim:0.7
registry.k8s.io/nginx-slim:0.7
registry.k8s.io/nginx-slim:0.7
registry.k8s.io/nginx-slim:0.21
registry.k8s.io/nginx-slim:0.21
registry.k8s.io/nginx-slim:0.21
```

By moving the `partition` to `0`, you allowed the StatefulSet to
Expand Down
2 changes: 1 addition & 1 deletion content/en/examples/application/web/web-parallel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ spec:
spec:
containers:
- name: nginx
image: registry.k8s.io/nginx-slim:0.8
image: registry.k8s.io/nginx-slim:0.24
ports:
- containerPort: 80
name: web
Expand Down
2 changes: 1 addition & 1 deletion content/en/examples/application/web/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
spec:
containers:
- name: nginx
image: registry.k8s.io/nginx-slim:0.7
image: registry.k8s.io/nginx-slim:0.21
ports:
- containerPort: 80
name: web
Expand Down

0 comments on commit e9c7b06

Please sign in to comment.