You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* removed namespace from kubectl and kn commands
* more namespace references removed
* Updated the traffic distribution to use the new rules
Co-authored-by: ammbra <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>
As you had observed that the Knative service `blue-green-canary` now has two revisions namely *blue-green-canary-xjygh-1* and *blue-green-canary-yzrwq-2*. As the Revision names are autogenerated it is hard to comprehend to which code/configuration set it corresponds to. To overcome this problem Knative provides *tagging* of revision names that allows one to tag a revision name to a logical human understanable names called *tags*.
147
+
As you had observed that the Knative service `blue-green-canary` now has two revisions namely *blue-green-canary-00001* and *blue-green-canary-00002*. As the Revision names are autogenerated it is hard to comprehend to which code/configuration set it corresponds to. To overcome this problem Knative provides *tagging* of revision names that allows one to tag a revision name to a logical human understanable names called *tags*.
148
148
149
149
As our colors service shows different colors on the browser let us tag the revisions with color,
150
150
@@ -160,20 +160,20 @@ kn revision list -s blue-green-canary
160
160
[source,bash]
161
161
----
162
162
NAME SERVICE TRAFFIC TAGS GENERATION AGE CONDITIONS READY REASON
163
-
blue-green-canary-yzrwq-2 blue-green-canary 100% 2 23m 3 OK / 4 True
164
-
blue-green-canary-xjygh-1 blue-green-canary 1 51m 3 OK / 4 True
163
+
blue-green-canary-00002 blue-green-canary 100% 2 23m 3 OK / 4 True
164
+
blue-green-canary-00001 blue-green-canary 1 51m 3 OK / 4 True
165
165
----
166
166
167
167
When Knative rolls out a new revision, it increments the `GENERATION` by *1* and then routes *100%* of the `TRAFFIC` to it, hence we can use the `GENERATION` or `TRAFFIC` to identify the latest reivsion.
168
168
169
169
=== Tag Blue
170
170
171
-
Let us tag `blue-green-canary-xjygh-1` which shows *blue* browser page with tag name `blue`.
171
+
Let us tag `blue-green-canary-00001` which shows *blue* browser page with tag name `blue`.
172
172
173
173
[.console-input]
174
174
[source,bash,subs="+macros,attributes+,+quotes"]
175
175
----
176
-
kn service update blue-green-canary --tag=#blue-green-canary-xjygh-1#=blue
176
+
kn service update blue-green-canary --tag=#blue-green-canary-00001#=blue
177
177
----
178
178
179
179
[.console-output]
@@ -186,18 +186,18 @@ Updating Service 'blue-green-canary' in namespace 'knativetutorial':
186
186
0.162s Waiting for load balancer to be ready
187
187
0.303s Ready to serve.
188
188
189
-
Service 'blue-green-canary' with latest revision 'blue-green-canary-yzrwq-2' (unchanged) is available at URL:
189
+
Service 'blue-green-canary' with latest revision 'blue-green-canary-00002' (unchanged) is available at URL:
blue-green-canary-00001 blue-green-canary #blue# 1 57m 3 OK / 4 True
255
255
----
256
256
257
257
As *green* happend to be latest revision it has been tagged with name `lastest` in addition to `green`.
@@ -265,7 +265,7 @@ Knative offers a simple way of switching 100% of the traffic from one Knative se
265
265
266
266
In this exercise you will applying the Blue/Green deployment pattern with the Knative Service called greeter. You have already deployed two <<deploying-revisions,revisions>> of blue-green-canary identified using the tags `blue` and `green`.
267
267
268
-
With the deployment of *green* revison you noticed that Knative automatically started to routing 100% of the traffic to `blue-green-canary-yzrwq-2`.
268
+
With the deployment of *green* revison you noticed that Knative automatically started to routing 100% of the traffic to `blue-green-canary-00002`.
269
269
270
270
Now let us assume, due to a critical bug we need to roll back `green` to `blue`.
271
271
@@ -292,7 +292,7 @@ Let us list all revisions with tags:
292
292
[.console-input]
293
293
[source,bash,subs="+macros,+attributes"]
294
294
----
295
-
kn revision list --namespace {tutorial-namespace}
295
+
kn revision list
296
296
----
297
297
298
298
Based on the revision tags that we created earlier, the output should be like:
@@ -301,8 +301,8 @@ Based on the revision tags that we created earlier, the output should be like:
301
301
[source,text,subs="quotes"]
302
302
----
303
303
NAME SERVICE TRAFFIC TAGS GENERATION AGE CONDITIONS READY REASON
304
-
blue-green-canary-yzrwq-2 blue-green-canary latest,green 2 56m 4 OK / 4 True
0 commit comments