You can manage traffic routing to different Revisions of a Knative Service by modifying the traffic spec of the Service resource.
- When you create a Knative Service, it does not have any default traffic spec settings.
- 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.
- When a tag attribute is applied to a Route, an address for the specific traffic target is created.
- In this example, you can access the staging target by accessing staging-…
- The targets for example-service-2 and example-service-3 can only be accessed using the main route, …
- 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.
- From the previous example, a new Kubernetes Service called staging- will be created in the same namespace.
Latest posts by Rajesh Kumar (see all)
- Apache Lucene Query Example - April 8, 2024
- Google Cloud: Step by Step Tutorials for setting up Multi-cluster Ingress (MCI) - April 7, 2024
- What is Multi-cluster Ingress (MCI) - April 7, 2024