@@ -76,9 +76,7 @@ It creates a [headless Service](/docs/concepts/services-networking/service/#head
76
76
77
77
{{% code_sample file="application/web/web.yaml" %}}
78
78
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
82
80
[ ` kubectl get ` ] ( /docs/reference/generated/kubectl/kubectl-commands/#get ) to watch the creation
83
81
of the StatefulSet's Pods.
84
82
@@ -88,10 +86,10 @@ kubectl get pods -w -l app=nginx
88
86
89
87
In the second terminal, use
90
88
[ ` 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:
92
90
93
91
``` shell
94
- kubectl apply -f web.yaml
92
+ kubectl apply -f https://k8s.io/examples/application/web/ web.yaml
95
93
```
96
94
```
97
95
service/nginx created
@@ -919,7 +917,7 @@ you deleted the `nginx` Service (which you should not have), you will see
919
917
an error indicating that the Service already exists.
920
918
921
919
``` shell
922
- kubectl apply -f web.yaml
920
+ kubectl apply -f https://k8s.io/examples/application/web/ web.yaml
923
921
```
924
922
```
925
923
statefulset.apps/web created
@@ -1038,7 +1036,7 @@ service "nginx" deleted
1038
1036
Recreate the StatefulSet and headless Service one more time:
1039
1037
1040
1038
``` shell
1041
- kubectl apply -f web.yaml
1039
+ kubectl apply -f https://k8s.io/examples/application/web/ web.yaml
1042
1040
```
1043
1041
1044
1042
```
@@ -1104,8 +1102,6 @@ Pod. This option only affects the behavior for scaling operations. Updates are n
1104
1102
1105
1103
{{% code_sample file="application/web/web-parallel.yaml" %}}
1106
1104
1107
- Download the example above, and save it to a file named ` web-parallel.yaml `
1108
-
1109
1105
This manifest is identical to the one you downloaded above except that the ` .spec.podManagementPolicy `
1110
1106
of the ` web ` StatefulSet is set to ` Parallel ` .
1111
1107
@@ -1118,7 +1114,7 @@ kubectl get pod -l app=nginx -w
1118
1114
In another terminal, create the StatefulSet and Service in the manifest:
1119
1115
1120
1116
``` shell
1121
- kubectl apply -f web-parallel.yaml
1117
+ kubectl apply -f https://k8s.io/examples/application/web/ web-parallel.yaml
1122
1118
```
1123
1119
```
1124
1120
service/nginx created
0 commit comments