{"id":32992,"date":"2023-03-17T12:20:02","date_gmt":"2023-03-17T12:20:02","guid":{"rendered":"https:\/\/www.devopsschool.com\/blog\/?p=32992"},"modified":"2025-01-13T12:15:23","modified_gmt":"2025-01-13T12:15:23","slug":"knative-tutorials-knative-service-traffic-management-using-tags-to-create-target-urls","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/knative-tutorials-knative-service-traffic-management-using-tags-to-create-target-urls\/","title":{"rendered":"Knative Tutorials: Knative Service: Traffic management: Using tags to create target URLs"},"content":{"rendered":"\n<p>You can manage traffic routing to different Revisions of a Knative Service by modifying the traffic spec of the Service resource.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you create a Knative Service, it does not have any default traffic spec settings.<\/li>\n\n\n\n<li>By setting the traffic spec, you can split traffic over any number of fixed Revisions, or send traffic to the latest Revision by setting latestRevision: true in the spec for a Service.<\/li>\n\n\n\n<li>When a tag attribute is applied to a Route, an address for the specific traffic target is created.<\/li>\n\n\n\n<li>In this example, you can access the staging target by accessing staging-&#8230;<\/li>\n\n\n\n<li>The targets for example-service-2 and example-service-3 can only be accessed using the main route, &#8230;<\/li>\n\n\n\n<li>When a traffic target is tagged, a new Kubernetes Service is created for that Service, so that other Services can access it within the cluster.<\/li>\n\n\n\n<li>From the previous example, a new Kubernetes Service called staging- will be created in the same namespace.<\/li>\n<\/ul>\n\n\n\n<script src=\"https:\/\/gist.github.com\/devops-school\/8142cf5d9c81f78e858c83e1fd0f2741.js\"><\/script>\n","protected":false},"excerpt":{"rendered":"<p>You can manage traffic routing to different Revisions of a Knative Service by modifying the traffic spec of the Service resource.<\/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-32992","post","type-post","status-publish","format-standard","hentry","category-knative"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32992","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=32992"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32992\/revisions"}],"predecessor-version":[{"id":32993,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/32992\/revisions\/32993"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=32992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=32992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=32992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}