Chapter 5. Observability
Observability, the ability to monitor services and examine traces, is a critically important architectural capability for any event-driven distributed system. Knative leverages Istio as one of its ingress and gateway implementations. The Istio control plane has the ability to collect the telemetric information. If a few extra components—Prometheus, Grafana, and Jaeger—are installed in the cluster, then Istio is configured to send the information to them automatically. Thus, observability in Knative can be achieved by simply deploying Prometheus, Grafana, and Jaeger into your Kubernetes cluster.
In this chapter, we will explore how to deploy the observability components, gather the metrics, and explore the traces of Knative-based applications.
Before You Begin
All the recipes in this chapter will be executed from the directory $BOOK_HOME
/advanced/observability, so change to the recipe directory by running:
$
cd
$BOOK_HOME
/advanced/observability
The recipes in this chapter will deployed in the chapter-5
namespace, so switch to the chapter-5
namespace with the following command:
$
kubectl
config
set
-context
--current
--namespace
=
chapter-5
5.1 Deploying Prometheus and Grafana
Problem
You want to collect and view your Knative Service metrics and analyze them using a dashboard.
Solution
Prometheus is used to collect metrics such as memory and CPU usage from your pods and services. The collected data can then be visualized using Grafana dashboards.
You ...
Get Knative Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.