Lesson 2 of 4 · Free to read
Exercises
Exercises — Kubernetes Observability on Kind
Watch & learn
Course video
Course video
Keep a lab notebook: hypothesis → command → result. Speed without evidence is not a skill.
How to use this file
- Work Lab A → B → C on the same
orders-labrepo - Prefer Docker Desktop; use Kind when the lab says so
- Definition of Done at the bottom is the phase gate
Lab A — Kind + kube-prometheus-stack
Time: 60–90 min
Goal: Prometheus/Grafana up in-cluster.
Setup
Kind cluster; Helm 3.
Steps
- Create Kind cluster with enough RAM.
- Helm install kube-prometheus-stack.
- Port-forward Grafana/Prometheus and login.
Success criteria
- Grafana shows cluster dashboards
If stuck
If pods Pending, check Kind node resources and PVC storage.
Lab B — ServiceMonitor your api
Time: 45–60 min
Goal: api metrics appear via ServiceMonitor.
Setup
api Deployment with /metrics.
Steps
- Add labels matching a ServiceMonitor selector.
- Apply ServiceMonitor YAML.
- Confirm targets UP in Prometheus.
Success criteria
- Target UP
- RED queries work in-cluster
If stuck
Namespace label selectors must match exactly.
Lab C — OTel Operator + burn-rate rule
Time: 60–90 min
Goal: Annotation injects SDK; PrometheusRule encodes burn-rate.
Setup
Operator installed; Instrumentation CR.
Steps
- Install OpenTelemetry Operator.
- Create Instrumentation resource; annotate api Pod template.
- Apply a PrometheusRule for multi-window burn-rate on error ratio.
- Verify async propagation still needs the phase-03 fix.
Success criteria
- Injected pods show OTel env/volume
- Rule loads in Prometheus
If stuck
Injection only applies to new pods — rollout restart.
Stretch goals
- Helm-install LGTM pieces in-cluster with PVCs
Definition of Done
- ServiceMonitor scrapes api
- Operator injection demonstrated
- Burn-rate PrometheusRule applied
Exercises — Kubernetes Observability on Kind.