@@ -49,13 +49,14 @@ The manifest file, included below, specifies a Deployment controller that runs a
49
49
1 . Launch a terminal window in the directory you downloaded the manifest files.
50
50
1 . Apply the MongoDB Deployment from the ` mongo-deployment.yaml ` file:
51
51
52
+ <!-- -
53
+ for local testing of the content via relative file path
54
+ kubectl apply -f ./content/en/examples/application/guestbook/mongo-deployment.yaml
55
+ -->
56
+
52
57
``` shell
53
58
kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-deployment.yaml
54
59
```
55
- < ! ---
56
- for local testing of the content via relative file path
57
- kubectl apply -f ./content/en/examples/application/guestbook/mongo-deployment.yaml
58
- -->
59
60
60
61
1. Query the list of Pods to verify that the MongoDB Pod is running:
61
62
@@ -84,15 +85,15 @@ The guestbook application needs to communicate to the MongoDB to write its data.
84
85
85
86
1. Apply the MongoDB Service from the following ` mongo-service.yaml` file:
86
87
88
+ < ! ---
89
+ for local testing of the content via relative file path
90
+ kubectl apply -f ./content/en/examples/application/guestbook/mongo-service.yaml
91
+ -->
92
+
87
93
` ` ` shell
88
94
kubectl apply -f https://k8s.io/examples/application/guestbook/mongo-service.yaml
89
95
` ` `
90
96
91
- < ! ---
92
- for local testing of the content via relative file path
93
- kubectl apply -f ./content/en/examples/application/guestbook/mongo-service.yaml
94
- -->
95
-
96
97
1. Query the list of Services to verify that the MongoDB Service is running:
97
98
98
99
` ` ` shell
@@ -122,15 +123,15 @@ The guestbook application has a web frontend serving the HTTP requests written i
122
123
123
124
1. Apply the frontend Deployment from the ` frontend-deployment.yaml` file:
124
125
126
+ < ! ---
127
+ for local testing of the content via relative file path
128
+ kubectl apply -f ./content/en/examples/application/guestbook/frontend-deployment.yaml
129
+ -->
130
+
125
131
` ` ` shell
126
132
kubectl apply -f https://k8s.io/examples/application/guestbook/frontend-deployment.yaml
127
133
` ` `
128
134
129
- < ! ---
130
- for local testing of the content via relative file path
131
- kubectl apply -f ./content/en/examples/application/guestbook/frontend-deployment.yaml
132
- -->
133
-
134
135
1. Query the list of Pods to verify that the three frontend replicas are running:
135
136
136
137
` ` ` shell
@@ -160,15 +161,15 @@ Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, su
160
161
161
162
1. Apply the frontend Service from the ` frontend-service.yaml` file:
162
163
164
+ < ! ---
165
+ for local testing of the content via relative file path
166
+ kubectl apply -f ./content/en/examples/application/guestbook/frontend-service.yaml
167
+ -->
168
+
163
169
` ` ` shell
164
170
kubectl apply -f https://k8s.io/examples/application/guestbook/frontend-service.yaml
165
171
` ` `
166
172
167
- < ! ---
168
- for local testing of the content via relative file path
169
- kubectl apply -f ./content/en/examples/application/guestbook/frontend-service.yaml
170
- -->
171
-
172
173
1. Query the list of Services to verify that the frontend Service is running:
173
174
174
175
` ` ` shell
@@ -179,7 +180,7 @@ kubectl apply -f ./content/en/examples/application/guestbook/frontend-service.ya
179
180
180
181
` ` `
181
182
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
182
- frontend ClusterIP 10.0.0.112 < none> 80/TCP 6s
183
+ frontend ClusterIP 10.0.0.112 < none> 80/TCP 6s
183
184
kubernetes ClusterIP 10.0.0.1 < none> 443/TCP 4m
184
185
mongo ClusterIP 10.0.0.151 < none> 6379/TCP 2m
185
186
` ` `
@@ -214,8 +215,8 @@ If you deployed the `frontend-service.yaml` manifest with type: `LoadBalancer` y
214
215
The response should be similar to this:
215
216
216
217
` ` `
217
- NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
218
- frontend ClusterIP 10.51.242.136 109.197.92.229 80:32372/TCP 1m
218
+ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
219
+ frontend LoadBalancer 10.51.242.136 109.197.92.229 80:32372/TCP 1m
219
220
` ` `
220
221
221
222
1. Copy the external IP address, and load the page in your browser to view your guestbook.
@@ -245,7 +246,7 @@ You can scale up or down as needed because your servers are defined as a Service
245
246
frontend-3823415956-k22zn 1/1 Running 0 54m
246
247
frontend-3823415956-w9gbt 1/1 Running 0 54m
247
248
frontend-3823415956-x2pld 1/1 Running 0 5s
248
- mongo-1068406935-3lswp 1/1 Running 0 56m
249
+ mongo-1068406935-3lswp 1/1 Running 0 56m
249
250
` ` `
250
251
251
252
1. Run the following command to scale down the number of frontend Pods:
@@ -266,7 +267,7 @@ You can scale up or down as needed because your servers are defined as a Service
266
267
NAME READY STATUS RESTARTS AGE
267
268
frontend-3823415956-k22zn 1/1 Running 0 1h
268
269
frontend-3823415956-w9gbt 1/1 Running 0 1h
269
- mongo-1068406935-3lswp 1/1 Running 0 1h
270
+ mongo-1068406935-3lswp 1/1 Running 0 1h
270
271
` ` `
271
272
272
273
0 commit comments