Verify in-cluster routing

Before you apply a policy, verify that the productpage service can route to the ratings-v1 and ratings-v2 services within the same service mesh in cluster1.

  1. In a separate tab in your terminal, open the Bookinfo product page from your local host.

    1. Enable port-forwarding on the product page deployment.
        kubectl -n bookinfo port-forward deployment/productpage-v1 9080:9080
        
    2. Open your browser to http://localhost:9080/productpage?u=normal.
  2. Refresh the page a few times to see the black stars in the Book ratings column appear and disappear. The presence of black stars represents ratings-v2 and the absence of stars represents ratings-v1, and the presence of red stars represents ratings-v3.

    Figure: Bookinfo product page UI

Apply fault injection

Apply a fault injection policy to the ratings service to delay requests and simulate network issues or an overloaded service. A delay simulates an overloaded upstream service or network issues, and can help you build more resilient apps.

  1. Create a temporary curl or debug pod and send a request to the ratings app from your local machine.

  2. Create a fault injection policy to delay responses from the ratings app by 10 seconds, and a route table specifically for testing access to the ratings app.

      kubectl apply -f- <<EOF
    apiVersion: resilience.policy.gloo.solo.io/v2
    kind: FaultInjectionPolicy
    metadata:
      name: faultinjection-basic-delay
      namespace: bookinfo
    spec:
      applyToRoutes:
        - route:
            labels:
              route: ratings
      config:
        delay:
          fixedDelay: 10s
    ---
    apiVersion: networking.gloo.solo.io/v2
    kind: RouteTable
    metadata:
      name: ratings-rt
      namespace: bookinfo
    spec:
      hosts:
      - ratings
      http:
      - forwardTo:
          destinations:
          - ref:
              name: ratings
              namespace: bookinfo
        labels:
          route: ratings
      workloadSelectors:
      - {}
    EOF
      
  3. Send another request to the ratings app by using the same method as in step 1. Note that this time, the app’s response is delayed due to the fault injection.

Explore the UI

Use the Gloo UI to evaluate the health and efficiency of your service mesh.

  1. Open the Gloo UI. The Gloo UI is served from the gloo-mesh-ui service on port 8090. You can connect by using the meshctl or kubectl CLIs.

  • meshctl: For more information, see the CLI documentation.
      meshctl dashboard
      
  • kubectl:
    1. Port-forward the gloo-mesh-ui service on 8090.
        kubectl port-forward -n gloo-mesh svc/gloo-mesh-ui 8090:8090
        
    2. Open your browser and connect to http://localhost:8090.
  1. Review the Dashboard page, which presents an at-a-glance look at the health of workspaces and clusters that make up your Gloo setup.

    • In the Workspaces pane, you can review the workspace that was automatically created for you in your Gloo setup.
    • In the Clusters pane, you can review the workload clusters that are currently connected to your Gloo setup.
    Figure: Overview UI screenshot
  2. Verify the details of the fault injection policy that you created in the previous section.

    1. Click the Resources tab to open the Solo resources page.
    2. In the row for your policy, faultinjection-basic-delay, click View Policy.
    3. Review the details of the policy, such as the ratings route that it applies to.
    4. Click View YAML.
    5. Scroll to the end of the YAML output to verify that the policy has a state of ACCEPTED.

Next steps

Now that you have Gloo Mesh Enterprise and Istio up and running, check out some of the following resources to learn more about Gloo Mesh and expand your service mesh capabilities.

Gloo Mesh Enterprise:

  • Customize your Gloo Mesh installation with a Helm-based setup.
    • Enable insights to review and improve your setup’s health and security posture.

    Istio: Now that you have Gloo Mesh Enterprise and Istio installed, you can use Gloo to manage your Istio service mesh resources. You don’t need to directly configure any Istio resources going forward.

    Help and support:

    Cleanup

    You can optionally remove the resources that you set up as part of this guide.

    1. Delete the fault injection policy and testing route table.

        kubectl delete FaultInjectionPolicy faultinjection-basic-delay -n bookinfo
      kubectl delete RouteTable ratings-rt -n bookinfo
        
    2. If you no longer need this quick-start Gloo Mesh environment, you can follow the steps in the uninstall guide.