Routing traffic to services outside of the cluster
In your IT environments, not all services will be deployed within the Kubernetes cluster; there will be services running on traditional VMs or bare metal environments, there will be services that will be provided by SaaS providers as well as your business partners, and there will be services running outside or on a different Kubernetes cluster. In those scenarios, there is a requirement to let services from the mesh reach out to such services. So, as the next steps, let’s try building routes to a service outside of the cluster. We will make use of the httpbin
service, available at https://httpbin.org/.
Any request destined for mockshop.com/get
should be routed to httpbin
; the rest should be processed by envoy-dummy-svc, which
we created in the previous section.
In the following virtual service definition, we have defined that any request with /get
should be routed to httpbin.org
:
- match: - uri...