Explore the OpenTracing project and a specific supporting implementation called Jaeger—a simple way of capturing the current state of the service mesh—and learn how traffic is flowing and forwarding within the service mesh.
- [Instructor] In addition to the routing and authentication services, Istio provides the ability because of the connection through the proxy resources to actually start tracing resources throughout the system. If we look at our module directory here, we have a setup bookinfo file. We're going to more that. And while this doesn't look like this got much to do with tracing, the reason that we want to get this particular application set up, is that it already has a number of the additional hooks and connections that are needed to highlight how the tracing information gets collected.
The proxy can only do so much. We have to actually to actually inject additional information, and the bookinfo application already has that capability built in. So we're just going to grab this entire bulk of code. We're going to change into our Istio directory, where we downloaded Istio initially. We're going to create a namespace, and then we're going to make sure that we can inject Istio into that namespace, and lastly we're going to launch the bookinfo plus a gateway, plus the destination rules to make sure that we're picking a service of the bookinfo application, and then finally the virtual services as well, and then we'll use that information.
We'll actually go and look at the bookinfo application, because that will generate a set of traces for us to then go look at. We're going to go ahead and copy this, command C. I'm going to quit out of the more for just a moment, and command V paste, and this is basically moving into the Istio directory, running through and creating deployments for all the different services, different version of services even though we're only going to be using the one, but it creates all of that for us. It creates our gateway for the ingress, so that we can actually get it added from a local web browser more easily, and creates a destination rules.
That's how we actually, again, map destination rules into virtual service subsets. So we have all those resources stacked so that we can actually talk to the gateway. Now we also need to know what the minikube IP address is so that we can create a URI within the web browser. So what we're going to do minikube IP, going to go ahead and grab that. The actual URL is in the setup book information. Actually we might as well just look at that quick. More, setup, bookinfo. I've grabbed the IP address for minikube.
We have to add the 31380/productpage onto that. So you can either copy this part, or the IP address, and actually it's probably easier to remember the IP address than it is to remember the product page. So I'll just copy this part. We'll go to a web browser, and here we'll type in the address 192.16864.2, and then the part that I grabbed which was the port. This is a known port, so this is my node port address 313380/productpage. I don't have to put the http on front, it'll assume that, and if all goes well we get our bookinfo page.
So this is now the application, its running. It's done its best. If I refresh the page, I still get the same page. Nothing really exciting going on there. But what I do want to also do then, is grab the Jaeger UI, and so to do that, I can grab the kubectl command to port forward into the Kubernetes environment, and get access to the Jaeger user interface. So I'm going to copy this command, command C. Paste it, command V. It will run in the background.
So it'll continue to run, but the important part is this. I need to go to my local host because of the proxy function on port 16686, and again we'll pop back to our web broswer. We'll create a new tab in the web browser, and we're going to paste that in, and go ahead and hit enter. And this should bring up the Jaeger user interface. Now we'll have a whole selection of services here from all the different resources that we've built out, but the one that we're looking for is specifically the productpage service, and then we can go to the bottom and say find traces, and you can see that there are a number of traces here, some more recent than others, and we can go look at the latest one of the bunch.
Actually 22 spans seems about right. About a minute ago, yeah, that looks good. This was probably a refresh, and so I want to grab the full page download so that the first page download, and you can see that a number of services have happened here. So come in through the gateway, and finally I'm done at the very bottom. You can see that it took a second and a half. We'll go into more of this in the next module.
- Adding Istio to a microservice
- Traffic routing and deployment
- Creating advanced route rules with Istio
- Modifying routes for Canary deployments
- Establishing MTLS credentials
- Connecting to non-MTLS services
- Connecting Istio to OpenTracing
- Improving microservice robustness
- Forcing aborts in specific applications