{"id":41489,"date":"2023-12-01T05:23:43","date_gmt":"2023-12-01T05:23:43","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=41489"},"modified":"2025-01-13T12:15:20","modified_gmt":"2025-01-13T12:15:20","slug":"knative-tutorials-chapter-5-serving-multiple-versions-simultaneously","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/knative-tutorials-chapter-5-serving-multiple-versions-simultaneously\/","title":{"rendered":"Knative Tutorials &#8211; Chapter 5 &#8211; Serving multiple versions simultaneously"},"content":{"rendered":"\n<p>The&nbsp;<code>helloworld<\/code>&nbsp;Service had a&nbsp;<code>spec.runLatest<\/code>&nbsp;field which serves all the traffic to the latest revision created form the Service&#8217;s&nbsp;<code>revisionTemplate<\/code>&nbsp;field.<\/p>\n\n\n\n<p>To test out the effects of a new version of your application, you will need to run multiple versions of your applications and route a portion of your traffic to the new &#8220;canary&#8221; version you are testing. This practice is called&nbsp;<strong>&#8220;blue-green deployment&#8221;.<\/strong><\/p>\n\n\n\n<p>Knative Serving offers the&nbsp;<code>Revision<\/code>&nbsp;API, which tracks the changes to application configuration, and the&nbsp;<code>Route<\/code>&nbsp;API, which lets you split the traffic to multiple revisions.<\/p>\n\n\n\n<p>In this exercise you will:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Deploy a &#8220;blue&#8221; Service version in&nbsp;<code>runLatest<\/code>&nbsp;mode.<\/li>\n\n\n\n<li>Update Service with &#8220;green&#8221; configuration and change mode to&nbsp;<code>release<\/code>&nbsp;to split traffic between two revisions.<\/li>\n<\/ol>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/d7cec39b90e8e736435fd866ea5ebe31.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>The&nbsp;helloworld&nbsp;Service had a&nbsp;spec.runLatest&nbsp;field which serves all the traffic to the latest revision created form the Service&#8217;s&nbsp;revisionTemplate&nbsp;field. To test out the effects of a new version of your application, you will need to run multiple versions of your applications and route a portion of your traffic to the new &#8220;canary&#8221; version you are testing. This practice&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_joinchat":[],"footnotes":""},"categories":[8921],"tags":[],"class_list":["post-41489","post","type-post","status-publish","format-standard","hentry","category-knative"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=41489"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41489\/revisions"}],"predecessor-version":[{"id":41490,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/41489\/revisions\/41490"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=41489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=41489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=41489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}