Skip to content

Commit 4c04be3

Browse files
authored
Merge pull request #43984 from sftim/20231117_statefulset_changes
Switch StatefulSet tutorial to HTTP manifest source
2 parents dd7ee6d + 13039d8 commit 4c04be3

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

content/en/docs/tutorials/stateful-application/basic-stateful-set.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ It creates a [headless Service](/docs/concepts/services-networking/service/#head
7676

7777
{{% code_sample file="application/web/web.yaml" %}}
7878

79-
Download the example above, and save it to a file named `web.yaml`
80-
81-
You will need to use two terminal windows. In the first terminal, use
79+
You will need to use at least two terminal windows. In the first terminal, use
8280
[`kubectl get`](/docs/reference/generated/kubectl/kubectl-commands/#get) to watch the creation
8381
of the StatefulSet's Pods.
8482

@@ -88,10 +86,10 @@ kubectl get pods -w -l app=nginx
8886

8987
In the second terminal, use
9088
[`kubectl apply`](/docs/reference/generated/kubectl/kubectl-commands/#apply) to create the
91-
headless Service and StatefulSet defined in `web.yaml`.
89+
headless Service and StatefulSet:
9290

9391
```shell
94-
kubectl apply -f web.yaml
92+
kubectl apply -f https://k8s.io/examples/application/web/web.yaml
9593
```
9694
```
9795
service/nginx created
@@ -919,7 +917,7 @@ you deleted the `nginx` Service (which you should not have), you will see
919917
an error indicating that the Service already exists.
920918

921919
```shell
922-
kubectl apply -f web.yaml
920+
kubectl apply -f https://k8s.io/examples/application/web/web.yaml
923921
```
924922
```
925923
statefulset.apps/web created
@@ -1038,7 +1036,7 @@ service "nginx" deleted
10381036
Recreate the StatefulSet and headless Service one more time:
10391037

10401038
```shell
1041-
kubectl apply -f web.yaml
1039+
kubectl apply -f https://k8s.io/examples/application/web/web.yaml
10421040
```
10431041

10441042
```
@@ -1104,8 +1102,6 @@ Pod. This option only affects the behavior for scaling operations. Updates are n
11041102

11051103
{{% code_sample file="application/web/web-parallel.yaml" %}}
11061104

1107-
Download the example above, and save it to a file named `web-parallel.yaml`
1108-
11091105
This manifest is identical to the one you downloaded above except that the `.spec.podManagementPolicy`
11101106
of the `web` StatefulSet is set to `Parallel`.
11111107

@@ -1118,7 +1114,7 @@ kubectl get pod -l app=nginx -w
11181114
In another terminal, create the StatefulSet and Service in the manifest:
11191115

11201116
```shell
1121-
kubectl apply -f web-parallel.yaml
1117+
kubectl apply -f https://k8s.io/examples/application/web/web-parallel.yaml
11221118
```
11231119
```
11241120
service/nginx created

0 commit comments

Comments
 (0)