Skip to content

Commit e7258cb

Browse files
committed
upgrade: serving updated to v0.19
1 parent be1ed6d commit e7258cb

File tree

3 files changed

+12
-62
lines changed

3 files changed

+12
-62
lines changed

documentation/modules/serving/pages/_partials/invoke-service.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[.console-input]
1212
[source,bash,subs="+macros,+attributes"]
1313
----
14-
http http://greeter.{tutorial-namespace}.{minikube-nip-io}
14+
http $(kn service describe greeter -n {tutorial-namespace} -o url)
1515
----
1616

1717
#end::call[]

documentation/modules/serving/pages/scaling.adoc

Lines changed: 5 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,8 @@ After the deployment of the service was successful we should see a Kubernetes de
4141

4242
[#scaling-invoke-service]
4343
== Invoke Service
44-
ifndef::workshop[]
45-
[tabs]
46-
====
47-
Minikube::
48-
+
49-
--
50-
include::serving:partial$invoke-service.adoc[tags=**;!workshop-call;!workshop-call-params]
5144

52-
--
53-
OpenShift::
54-
+
55-
--
56-
include::serving:partial$invoke-service.adoc[tags=workshop-call]
57-
--
58-
====
59-
endif::[]
60-
61-
ifdef::workshop[]
62-
--
63-
include::serving:partial$invoke-service.adoc[tags=workshop-call]
64-
--
65-
endif::[]
45+
include::serving:partial$invoke-service.adoc[tags=**;!workshop-call;!workshop-call-params]
6646

6747
The last `http` command should return a response like:
6848

@@ -130,45 +110,15 @@ include::serving:partial$watch-scaling-pods.adoc[]
130110

131111
We will now send some load to the greeter service. The command below sends 50 concurrent requests (`-c 50`) for the next 10s (`-z 10s`)
132112

133-
ifndef::workshop[]
134-
[tabs]
135-
====
136-
Minikube::
137-
+
138-
--
139-
[#scaling-run-siege]
140-
[.console-input]
141-
[source,bash,subs="attributes+,+macros",linenums]
142-
----
143-
hey -c 50 -z 10s \
144-
"http://prime-generator.{tutorial-namespace}.{minikube-nip-io}/?sleep=3&upto=10000&memload=100"
145-
----
146-
--
147-
OpenShift::
148-
+
149-
--
150-
[#oc-scaling-run-siege]
151-
[.console-input]
152-
[source,bash,subs="attributes+,+macros",linenums]
153-
----
154-
export SVC_URL=`{kubernetes-cli} get rt prime-generator -o yaml | yq read - 'status.url'`
155-
156-
hey -c 50 -z 10s \
157-
"pass:[${SVC_URL}]/?sleep=3&upto=10000&memload=100"
158-
----
159-
--
160-
====
161-
endif::[]
162-
163113
[#oc-scaling-run-siege]
164114
[.console-input]
165115
[source,bash,subs="attributes+,+macros",linenums]
166116
----
167-
export SVC_URL=`{kubernetes-cli} get rt prime-generator -o yaml | yq read - 'status.url'`
168-
hey -c 50 -z 10s "pass:[${SVC_URL}]/?sleep=3&upto=10000&memload=100"
117+
export SVC_URL=$(kn service describe prime-generator -n{tutorial-namespace} -url)
118+
hey -c 50 -z 10s "pass:[$SVC_URL]/?sleep=3&upto=10000&memload=100"
169119
----
170120

171-
After you've successfully run this small load test, you will notice the number of greeter service pods will have scaled to *5* automatically.
121+
After you've successfully run this small load test, you will notice the number of greeter service pods will have scaled to *5* or more pods automatically.
172122

173123
The autoscale pods is computed using the formula:
174124

@@ -215,7 +165,7 @@ Let us send some load to the service to trigger autoscaling:
215165
[.console-input]
216166
[source,bash,subs="attributes+,+macros",linenums]
217167
----
218-
hey -c 50 -z 10s "pass:[${SVC_URL}]/?sleep=3&upto=10000&memload=100"
168+
hey -c 50 -z 10s "pass:[$SVC_URL]/?sleep=3&upto=10000&memload=100"
219169
----
220170

221171
When all requests are done and if we are beyond the `scale-to-zero-grace-period`, we will notice that Knative has terminated only 3 out 5 pods. This is because we have configured Knative to always run two pods via the annotation `autoscaling.knative.dev/minScale: "2"`.

documentation/modules/serving/pages/traffic-distribution.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Updating Service 'blue-green-canary' in namespace 'knativetutorial':
187187
0.303s Ready to serve.
188188
189189
Service 'blue-green-canary' with latest revision 'blue-green-canary-yzrwq-2' (unchanged) is available at URL:
190-
http://blue-green-canary.knativetutorial.192.168.64.29.nip.io
190+
http://blue-green-canary.knativetutorial.192.168.64.13.nip.io
191191
----
192192

193193
=== Tag Green
@@ -211,7 +211,7 @@ Updating Service 'blue-green-canary' in namespace 'knativetutorial':
211211
0.303s Ready to serve.
212212
213213
Service 'blue-green-canary' with latest revision 'blue-green-canary-yzrwq-2' (unchanged) is available at URL:
214-
http://blue-green-canary.knativetutorial.192.168.64.29.nip.io
214+
http://blue-green-canary.knativetutorial.192.168.64.13.nip.io
215215
----
216216

217217
== Tag Latest
@@ -235,7 +235,7 @@ Updating Service 'blue-green-canary' in namespace 'knativetutorial':
235235
0.303s Ready to serve.
236236
237237
Service 'blue-green-canary' with latest revision 'blue-green-canary-yzrwq-2' (unchanged) is available at URL:
238-
http://blue-green-canary.knativetutorial.192.168.64.29.nip.io
238+
http://blue-green-canary.knativetutorial.192.168.64.13.nip.io
239239
----
240240

241241
Let us query the Service Revisions again,
@@ -318,9 +318,9 @@ The above command should return you three sub-routes for the main `greeter` rout
318318

319319
[source,bash,subs="+macros,attributes"]
320320
----
321-
http://latest-blue-green-canary.knativetutorial.192.168.64.29.nip.io #<.>
322-
http://blue-blue-green-canary.knativetutorial.192.168.64.29.nip.io #<.>
323-
http://green-blue-green-canary.knativetutorial.192.168.64.29.nip.io #<.>
321+
http://latest-blue-green-canary.knativetutorial.192.168.64.13.nip.io #<.>
322+
http://blue-blue-green-canary.knativetutorial.192.168.64.13.nip.io #<.>
323+
http://green-blue-green-canary.knativetutorial.192.168.64.13.nip.io #<.>
324324
----
325325

326326
<1> the sub route for the traffic tag `latest`

0 commit comments

Comments
 (0)