Istio Discovery Guide

This guide provides a basic overview of how to configure Grey Matter Catalog to retrieve service information from an Istioarrow-up-right mesh control plane.

Prerequisites

  1. An existing Grey Matter deployment following our Install on Kubernetes guide.

  2. An Istio deployment installed in the same Kubernetes cluster in the istio-system namespace, following one of the Istio Installation Guidesarrow-up-right.

  3. Istio's Bookinfo applicationarrow-up-right deployed in the same Kubernetes cluster, but in a separate istio-services namespace. See below for more details on why a separate namespace is required and how to perform this custom installation.

  4. greymatter CLI set up to connect to Grey Matter Catalog.

circle-info

Deploying Istio's Bookinfo application

This guide requires that Istio services be deployed in a separate Kubernetes namespace from the Grey Matter deployment. The namespace for the Bookinfo application will use Istio's automatic sidecar injectionarrow-up-right setting. Separating Istio and Grey Matter services into different namespaces will prevent namespace collisions.

The following commands should be substituted for the ones encountered in the Bookinfo instructions:

kubectl label namespace istio-services istio-injection=enabled
kubectl apply -f samples/bookinfo/platform/kube/bookinfo.yaml -n istio-services

Overview

  1. Configure a connection to the Istio control plane

  2. Configure service entries for tracking instances in the Istio mesh

Steps

1. Configure a connection to the Istio control plane

Control plane connections are tracked in Catalog using mesh configuration objects. The following example is a simple configuration object that specifies the address to Istio's control plane service. Save the following in a mesh.json file:

Use the greymatter CLI to create the configuration object in Catalog:

After creating a configuration object, Catalog responds with a summary including a status of each configured control plane connection, a map of instance counts, and mesh summary metadata. Note that the session_statuses.default session is marked as "Pending".

To retrieve an updated status on the control plane connection, run:

If Catalog was able to connect to the Istio control plane, the mesh summary response should resemble the following:

The instance_counts field should be populated by host:port pairs each with their own instance count, indicating that Catalog was able to discover a number of instances (i.e. Kubernetes podsarrow-up-right) for the service.

Each host:port pair refers to an individual Kubernetes deploymentarrow-up-right. If you want to organize this collection by Kubernetes servicearrow-up-right instead, run the following command to edit the istio-mesh-example configuration (ensure your $EDITOR environment variable is set):

Edit the configuration so that labels has the following:

The greymatter CLI should respond with another "Pending" status for the default session. To retrieve the updated state of the mesh object from Catalog, run:

You should see the following under instance_counts. Note that the reviews:9080 Kubernetes service has 3 instances, whereas the previous setting showed 3 distinct Kubernetes deployments (i.e. reviews-v1:9080, reviews-v2:9080, and reviews-v3:9080).

2. Configure service entries for tracking instances in the Istio mesh

Services are tracked in Catalog using service configuration objects that reference mesh configuration objects. The following example is a simple service object that references istio-mesh-example. Save the following in a reviews.json file:

Use the greymatter CLI to create the service configuration object in Catalog:

After creating a service configuration object, Catalog responds with a summary that includes the configuration, additional discovered data, and individual service instances. Note that each instance contains a metadata object that includes a k8s_namespace, k8s_deployment, and k8s_service for identifying which resource is being referenced in your Kubernetes cluster.

To retrieve the service summary object again, run the following:

Questions

circle-check

Last updated

Was this helpful?