From e9c7b069d53affeb15db2c2d6e01607f560a71ff Mon Sep 17 00:00:00 2001 From: shayan Date: Tue, 4 Jun 2024 11:10:02 +0330 Subject: [PATCH] Modify registry.k8s.io/nginx-slim version from 0.8 to 0.24 --- .../workloads/controllers/statefulset.md | 2 +- .../basic-stateful-set.md | 22 +++++++++---------- .../application/web/web-parallel.yaml | 2 +- content/en/examples/application/web/web.yaml | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/content/en/docs/concepts/workloads/controllers/statefulset.md b/content/en/docs/concepts/workloads/controllers/statefulset.md index 54c06cfb8b..516cb4f60c 100644 --- a/content/en/docs/concepts/workloads/controllers/statefulset.md +++ b/content/en/docs/concepts/workloads/controllers/statefulset.md @@ -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 diff --git a/content/en/docs/tutorials/stateful-application/basic-stateful-set.md b/content/en/docs/tutorials/stateful-application/basic-stateful-set.md index 35af85aef7..4fe4bb864f 100644 --- a/content/en/docs/tutorials/stateful-application/basic-stateful-set.md +++ b/content/en/docs/tutorials/stateful-application/basic-stateful-set.md @@ -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 @@ -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 ``` @@ -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 @@ -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 @@ -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 ``` @@ -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 @@ -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 diff --git a/content/en/examples/application/web/web-parallel.yaml b/content/en/examples/application/web/web-parallel.yaml index a6633f476c..3664c63c10 100644 --- a/content/en/examples/application/web/web-parallel.yaml +++ b/content/en/examples/application/web/web-parallel.yaml @@ -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 diff --git a/content/en/examples/application/web/web.yaml b/content/en/examples/application/web/web.yaml index 14e2d27e14..6f8f5133ff 100644 --- a/content/en/examples/application/web/web.yaml +++ b/content/en/examples/application/web/web.yaml @@ -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