Istio Discovery Guide
This guide provides a basic overview of how to configure Grey Matter Catalog to retrieve service information from an Istio mesh control plane.
Prerequisites
An existing Grey Matter deployment following our Install on Kubernetes guide.
An Istio deployment installed in the same Kubernetes cluster in the
istio-systemnamespace, following one of the Istio Installation Guides.Istio's Bookinfo application deployed in the same Kubernetes cluster, but in a separate
istio-servicesnamespace. See below for more details on why a separate namespace is required and how to perform this custom installation.greymatter CLI set up to connect to Grey Matter Catalog.
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 injection 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-servicesOverview
Configure a connection to the Istio control plane
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 pods) for the service.
Each host:port pair refers to an individual Kubernetes deployment. If you want to organize this collection by Kubernetes service 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
Need help with your installation?
Create an account at Grey Matter Support to reach our team.
Last updated
Was this helpful?