Skip to main content

Stage 6: Mission Operations

Page type · stage walkthrough
Verification status

stages/stage6/SIGNALS.md describes this ordered path as implemented, noting that a clean end-to-end lifecycle run is still required before it replaces the older all-in-one installer (apply.sh --mode helm --env dev). If a step here differs from what you see, trust the output and record it.

Where we left off​

  • Stage 4 made every Pod say whether it is alive and ready, and gave it CPU and memory requests.

  • Stage 5 packaged all of it as a Helm chart (with a Kustomize alternative), with one values file per environment, and let Argo CD keep the cluster equal to Git.

  • So we can now deploy Apollo the same way every time. But we still cannot answer the question operations actually gets asked:

    "Is booking healthy for passengers right now, and if not, why?"

  • Today the only tools are:

    • kubectl get pods: tells you a Pod is Running and Ready. It says nothing about how many bookings fail.
    • kubectl logs: one Pod at a time, and only while that Pod exists. A replaced Pod takes its history with it.
    • /metrics: in Stage 5 it returns Prometheus text with fixed placeholder values (http_requests_total{service="booking"} 0). It parses, but nothing in the code counts anything.
  • A booking crosses four services: booking → identity → flight → notification. When it is slow, there is no way to see which hop took the time.

Stage 6 adds the three signals that answer these questions:

  • Metric: a number over time ("what fraction of bookings failed in the last 5 minutes?").
  • Log: a line of text from one service at one moment ("what did booking say?").
  • Trace: the path of one request through every service, with timings ("where did this booking spend its time?").

What changes in this stage​

ConcernStage 5Stage 6Why it's better
What the code emits/metrics with fixed placeholder zeros; the log field trace_id actually holds the X-Request-IDReal Prometheus counters and histograms; OpenTelemetry spans; request_id, trace_id and span_id in log linesThe apps now produce data worth collecting
Collecting metricsNothingPrometheus, run by the Prometheus Operator, finds apps through ServiceMonitorsScrapes every backend every 30 s and keeps 30 days of history
Looking at metricscurl one PodGrafana with five provisioned dashboardsShared views across all services, over time
"Is booking OK?"A judgement callBooking SLO as recording rules plus a burn-rate alertHealth becomes a number: error ratio and remaining error budget
Logskubectl logs, one Pod, lost with the PodAlloy on every node ships logs to LokiSearch all services at once, after Pods are gone
Following one requestNot possibleOpenTelemetry Collector forwards spans to TempoOne booking shows as one trace across four services
Joining signals—Shared trace_id in spans and log linesGo from "error rate rose" to "this request" to "what the service said"
DeliveryThree Argo CD ApplicationsFour: dev/staging/prod plus one shared apollo11-observabilityThe shared observability namespace is owned once, not three times

What's in the folder​

PathWhat it isNew or replaces
code/{booking,flight,search,notification}/main.go, code/identity/main.pySame services, now instrumented: Prometheus metrics, OpenTelemetry tracing, traceparent on outbound callsReplaces Stage 5's code (which had placeholder /metrics)
bundles/prometheus-operator-v0.93.0.yamlOperator CRDs and controllerNew. Kept outside the chart so Helm's release Secret stays under Kubernetes' 1 MiB object limit
helm/apollo11/templates/observability/Prometheus, ServiceMonitors, rules, Grafana + dashboards, Loki + Alloy, Tempo, OTel Collector, Grafana HTTPRouteNew
helm/apollo11/templates/apps/*.yamlApp templates: Service gains an app label and a named http port; Pods get OTEL_* env varsChanged from Stage 5
helm/apollo11/values.yamlNew observability: block (images, retention, storage, resources)Extends Stage 5's values
overlays/Plain-manifest Kustomize path, now including observabilitySame role as Stage 5
argocd/applications/observability.yamlFourth Argo CD Application for the shared stackNew
scripts/apply.shInstaller. --without-observability installs only the Stage 5-compatible baselineExtends Stage 5's
scripts/signals-lab.sh, select-signals.pyAdd the signals one at a time (substages 1–6)New
scripts/slo-lab.shA bounded, self-restoring booking outageNew
scripts/trace-test.shMakes/cancels a booking, checks its four-service Tempo trace and polls Loki for matching logsNew
scripts/edge-probe.sh, observability-lab.shTrusted HTTPS edge Probe; reversible route failure/recovery and firing/resolved deliveryNew
OBSERVABILITY.mdAlert delivery, silences, edge routing and Grafana correlation walkthroughNew
SIGNALS.mdThe ordered signal path this page followsNew

Walkthrough​

Set the context once. Every Stage 6 script refuses to run against any other context.

export KUBE_CONTEXT=kind-apollo11

Step 1: Install the baseline, and see what the code now emits​

bash stages/stage6/scripts/apply.sh --without-observability
kubectl get ns | grep apollo # no apollo-observability yet
kubectl exec -n apollo-airlines-apps deploy/search -- \
wget -qO- http://127.0.0.1:8083/metrics | grep '^http_requests_total' | head -3

The apps are instrumented already. Only the collectors are missing. The key part of booking/main.go:

// booking/main.go (trimmed)
httpRequestsTotal = prometheus.NewCounterVec(
prometheus.CounterOpts{Name: "http_requests_total"},
[]string{"service", "method", "path", "status"}, // labels: small, fixed sets of values
)
httpRequestDurationMs = prometheus.NewHistogramVec(
prometheus.HistogramOpts{Name: "http_request_duration_ms",
Buckets: []float64{1, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000}},
[]string{"service", "method", "path"},
)
// metricsMiddleware runs after every request:
path := c.FullPath() // the route pattern, e.g. /api/bookings/:id, not the real ID
httpRequestsTotal.WithLabelValues(service, c.Request.Method, path, status).Inc()
  • What happens: every request adds 1 to a counter and drops its duration into a histogram bucket. /metrics shows the current totals in Prometheus text format.
  • Why labels are route patterns: each distinct label value creates a separate time series. A booking ID as a label would create one series per booking. IDs belong in logs and traces, not metrics.
  • Why the Service changed too: Stage 6 gives each app Service an app: <name> label and names its port http. The ServiceMonitor in Step 2 selects on exactly those two things.
  • Compared with Stage 5: /metrics printed the same metric names in Prometheus text format, but every value was a fixed 0. A scrape would succeed and record nothing. The deployment layer didn't change, the code did.
  • How each signal gets out: metrics are pulled, traces pushed, logs written to stdout. See How signals leave a service.
  • Still missing: right now you can still only kubectl logs one Pod and curl one /metrics. Each step below adds one signal.

Step 2: Metrics: let Prometheus find and scrape the apps​

bash stages/stage6/scripts/signals-lab.sh render 1 helm | grep -E '^kind:' | sort | uniq -c # look first, changes nothing
bash stages/stage6/scripts/signals-lab.sh apply 1 helm
kubectl port-forward -n apollo-observability svc/prometheus 19090:9090 >/dev/null 2>&1 &
curl -s localhost:19090/api/v1/targets | jq -r '.data.activeTargets[] | "\(.labels.job) \(.health)"' | sort

signals-lab.sh installs the Operator bundle, then applies the observability objects for the chosen substage. Two objects do the work:

# servicemonitors/booking-sm.yaml
kind: ServiceMonitor
metadata:
labels: {app.kubernetes.io/part-of: apollo-airlines} # Prometheus selects monitors by this label
spec:
selector: {matchLabels: {app: booking}} # which Service(s)
namespaceSelector: {any: true} # the Service lives in apollo-airlines-apps
endpoints:
- port: http # the named port added in Step 1
path: /metrics
interval: 30s
---
# prometheus/deployment.yaml
kind: Prometheus # a custom resource; the Operator turns it into a StatefulSet
spec:
serviceMonitorSelector:
matchLabels: {app.kubernetes.io/part-of: apollo-airlines}
retention: "30d"
storage: {volumeClaimTemplate: ...} # metrics survive a Prometheus restart (Stage 3's PVCs again)
  • What happens: the Operator watches ServiceMonitors, writes Prometheus's scrape config from them, and Prometheus scrapes each matching Service's endpoints every 30 s. You should see five targets up: booking, flight, identity, notification, search.
  • Why a ServiceMonitor, not a list of URLs: Pods come and go. A ServiceMonitor selects by label, exactly like a Service selects Pods in Stage 1. New Pods are scraped without anyone editing config.
  • Annotations too: the chart also adds prometheus.io/scrape annotations to Pods. This Operator-managed Prometheus does not read them. ServiceMonitors are what it uses.
  • Watch out: a ServiceMonitor object is a request to scrape. It proves nothing on its own. Only a target up with samples advancing proves collection:
curl -sG localhost:19090/api/v1/query \
--data-urlencode 'query=sum by (service) (rate(http_requests_total[2m]))' | jq -r '.data.result[] | "\(.metric.service) \(.value[1])"'
  • An idle service may be missing from that result. No traffic is not the same as broken. The discovery chapter covers the full selector chain.
  • Compared with Stage 5: the first time Apollo has history. "What was booking's request rate ten minutes ago?" now has an answer.

Step 3: Dashboards: a view, not a store​

bash stages/stage6/scripts/signals-lab.sh apply 2 helm
kubectl port-forward -n apollo-observability svc/grafana 13000:3000 >/dev/null 2>&1 &
curl -s localhost:13000/api/health

Open http://localhost:13000 (admin / apollo-admin, from observability.grafana in values.yaml). Grafana is also routed through the Stage 2 Envoy Gateway at grafana.apollo.local.

Dashboard (folder Apollo11)Shows
Apollo OverviewTargets up, requests/s and p95 latency per service
Booking ServiceBooking p50/p95/p99, error rate, requests by status code
Service Errors5xx and 4xx rates and error % per service
Service RuntimeProcess CPU and resident memory per target
Trace ViewerRecent booking traces from Tempo
  • What happens: Grafana sends PromQL to Prometheus and draws the answer. Dashboards and datasources are ConfigMaps in the chart, so every install gets the same views.
  • Why it matters that Grafana stores nothing: if Grafana is down, no data is lost. Prometheus keeps scraping. The reverse also holds: a healthy dashboard can show an empty panel when no samples exist.
  • Watch out: the Loki and Tempo datasources are already configured, but Loki and Tempo are not installed until Steps 5 and 6. A configured datasource proves nothing about whether that signal works.

Step 4: Turn "is booking OK?" into a number​

bash stages/stage6/scripts/signals-lab.sh apply 3 helm
curl -s localhost:19090/api/v1/rules | jq -r '.data.groups[].rules[] | "\(.type) \(.name)"' | sort -u

First, two terms:

  • SLO (service level objective): a target for how often something should work. Here: 99.5% of eligible booking-creation requests succeed.
  • Error budget: the 0.5% that may fail. Spending it faster than planned is the warning sign.

The rules are in prometheus/rules.yaml:

# group apollo.booking-slo (trimmed)
- record: apollo:booking_error_ratio:5m # also :1h and :28d
expr: |
(sum(rate(http_requests_total{service="booking",method="POST",path="/api/bookings",status=~"5.."}[5m])) or vector(0))
/ sum(rate(http_requests_total{service="booking",method="POST",path="/api/bookings",status=~"2..|5.."}[5m]))
and sum(rate(...same eligible requests...[5m])) > 0 # no traffic -> no value, not "100% fine"
- record: apollo:booking_error_budget_remaining:28d
expr: 1 - apollo:booking_error_ratio:28d / 0.005 # negative = overspent; not clamped
- alert: ApolloBookingErrorBudgetBurn
expr: apollo:booking_error_ratio:5m > (14.4 * 0.005) and apollo:booking_error_ratio:1h > (14.4 * 0.005)
for: 2m
  • What a recording rule is: a query Prometheus evaluates every 30 s and stores as a new series. Dashboards and alerts read apollo:booking_error_ratio:5m instead of repeating the long expression.
  • Why 4xx are excluded: "eligible" means 2xx or 5xx. A wrong password or a sold-out flight (409 No seats available) is the service working correctly. Only server failures spend budget.
  • Why "no traffic" is empty, not zero: with no bookings the ratio is undefined. Reporting it as 100% would hide an outage that also stops traffic.
  • Why two windows in the alert: the 5-minute window reacts quickly. The 1-hour window confirms it isn't a blip. 14.4× is the burn speed that would use the whole budget far too early. The objectives chapter explains burn rates.
  • The other rules: ApolloServiceDown (up == 0 for 2 m), ApolloErrorRateHigh (5xx above 5% per service), ApolloBookingLatencyP95High (p95 above 500 ms).

Now see the number move. Read slo-lab.sh first: it saves flight's replica count, scales flight to 0, sends real booking attempts for 150 s (each gets a 502), restores flight, then makes and cancels one recovery booking. It restores flight on exit even if interrupted.

Q() { curl -sG localhost:19090/api/v1/query --data-urlencode "query=$1" | jq -c '.data.result'; }
Q 'apollo:booking_error_ratio:5m' # before: [] (no bookings yet)
bash stages/stage6/scripts/slo-lab.sh
Q 'apollo:booking_error_ratio:5m' # near 1 during and just after the outage
Q 'apollo:booking_error_budget_remaining:28d' # negative
curl -s localhost:19090/api/v1/alerts | jq -r '.data.alerts[] | "\(.labels.alertname) \(.state)"'
  • What you see: the 5-minute ratio jumps toward 1, the budget goes negative, and ApolloBookingErrorBudgetBurn goes pending then firing. Minutes later the 5-minute ratio falls; the 1-hour and 28-day ratios fall slowly.
  • Why a drill can't prove the SLO: a fresh cluster has minutes of history. The 28-day window only looks like a monthly number.
  • Where alerts go: Prometheus sends firing alerts to Alertmanager, which groups/routes them to the in-cluster alert-receiver. Inspect firing and resolved payloads; no external messaging account is needed. See the delivery walkthrough below.
  • Compared with Stage 4: readiness told the kubelet whether one Pod should get traffic. The SLO tells people whether passengers are being served.

Step 5: Logs: one place, all services, after Pods are gone​

bash stages/stage6/scripts/signals-lab.sh apply 4 helm
kubectl get ds alloy -n apollo-observability # one Alloy Pod per node
kubectl port-forward -n apollo-observability svc/loki 13100:3100 >/dev/null 2>&1 &
curl -sG localhost:13100/loki/api/v1/query_range \
--data-urlencode 'query={namespace="apollo-airlines-apps", service="booking"}' \
--data-urlencode 'limit=5' | jq -r '.data.result[].values[][1]'

Alloy is the per-node collector. Its config in loki/alloy.yaml:

discovery.kubernetes "pods" {
role = "pod"
selectors { role = "pod" field = "spec.nodeName=" + sys.env("NODE_NAME") } # only Pods on my node
}
discovery.relabel "pod_logs" {
rule { source_labels = ["__meta_kubernetes_namespace"] target_label = "namespace" }
rule { source_labels = ["__meta_kubernetes_pod_label_app"] target_label = "service" } # the app label again
rule { source_labels = ["__meta_kubernetes_pod_name"] target_label = "pod" }
}
loki.write "local" { endpoint { url = "http://loki.apollo-observability.svc.cluster.local:3100/loki/api/v1/push" } }
  • What happens: each Alloy Pod streams the logs of the Pods on its own node through the Kubernetes API (loki.source.kubernetes, the same route kubectl logs uses; nothing is mounted from the node), attaches namespace, service, pod and container labels, and pushes them to Loki. Loki keeps them on a PVC (retention: 168h in values).
  • Why a DaemonSet: to divide the work. Each Alloy follows only its own node's Pods, so every Pod is followed exactly once and a new node gets its own Alloy. Lines from a deleted Pod survive only if Alloy shipped them before the kubelet removed its logs.
  • Why Loki indexes only labels: labels pick the streams; |= "text" then searches inside them. That keeps the index small. As with metrics, don't make IDs into labels.
  • What's in a line: the apps write JSON with timestamp, level, service, request_id, trace_id, span_id, message. In Stage 6, trace_id and span_id are filled from the request's span, so log lines can be joined to traces (Step 7), and request_id carries the X-Request-ID header (or a generated one) so you can find a request by a marker you chose.
  • Compared with Stage 5: kubectl logs read one Pod's current container. Here you query every service at once, and lines from deleted Pods are still there.
  • Watch out: finding old lines proves nothing about current collection. To test the pipeline, look for a request you just made, for example with your own marker: curl -H "X-Request-ID: marker-$(date +%s)" … from a Pod, then {namespace="apollo-airlines-apps"} | json | request_id="marker-…".
  • Breaking and restoring a substage: the SIGNALS guide's drills (delete the search ServiceMonitor, point the Collector's exporter at an unused port) restore by re-running signals-lab.sh apply <substage> helm, not by re-applying a saved kubectl get -o yaml dump. A dump carries server fields (resourceVersion, uid); re-applying it records them in the last-applied annotation, and the next signals-lab.sh apply fails with metadata.resourceVersion: Invalid value: 0.

Step 6: Traces: follow one booking through four services​

bash stages/stage6/scripts/signals-lab.sh apply 5 helm
bash stages/stage6/scripts/trace-test.sh # prints trace_id=... services=...

A span is one timed operation (an incoming request, or one outgoing call). A trace is all spans that share one trace_id. The code that keeps one booking in one trace, from booking/main.go:

r.Use(otelgin.Middleware("booking")) // reads an incoming traceparent header, starts a server span

func callService(parent context.Context, url, method, body, requestID string, ...) (int, []byte) {
ctx, span := otel.Tracer("booking-service").Start(parent, ...) // child span for the outbound call
req, _ := http.NewRequestWithContext(ctx, method, url, ...)
req.Header.Set("X-Request-ID", requestID)
addTraceparent(req) // writes the W3C traceparent header for the next service
...
}

The Pods send spans to the Collector (OTEL_EXPORTER_OTLP_ENDPOINT=otel-collector.apollo-observability.svc.cluster.local:4317, set by the app templates). The Collector config, otel-collector/config.yaml:

receivers: {otlp: {protocols: {grpc: {endpoint: 0.0.0.0:4317}, http: {endpoint: 0.0.0.0:4318}}}}
processors: {memory_limiter: {...}, batch: {timeout: 2s}}
exporters: {otlp/tempo: {endpoint: tempo.apollo-observability.svc.cluster.local:4317}}
service:
pipelines:
traces: {receivers: [otlp], processors: [memory_limiter, batch], exporters: [otlp/tempo]}
kubectl port-forward -n apollo-observability svc/tempo 13200:3100 >/dev/null 2>&1 &
TRACE_ID=<paste the trace_id from trace-test.sh>
curl -s localhost:13200/api/traces/$TRACE_ID \
| jq -r '[.batches[].resource.attributes[] | select(.key=="service.name").value.stringValue] | unique'
  • What happens: trace-test.sh logs in as the seeded passenger, books with a generated traceparent, waits until Tempo holds one trace containing booking, identity, flight and notification, then cancels the booking and checks the seat comes back.
  • Why every service must forward traceparent: each hop only knows the trace it was handed. If one service builds its outbound request from a fresh context, the next service starts a new trace and the chain breaks. The README lists this as a lesson from building the stage.
  • Why a Collector in between: apps send to one address and don't need to know about Tempo. Batching, memory limits and the backend choice live in one config. The Collector is a DaemonSet, but apps reach it through a normal Service, so a span may go to any node's Collector. The Go SDK's OTLP metrics also reach it and are dropped by its debug exporter: Prometheus's scrape is the only metrics path.
  • Tracing is out of band: if the Collector can't reach Tempo, bookings keep working and traces are silently lost. That is good for passengers, and a reason to check traces as their own pipeline.
  • Compared with Steps 2 and 5: a p95 says "some bookings were slow". A trace says "this booking spent its time in the flight seat update".

Step 7: Correlate one booking across all three signals​

Substage 6 installs nothing new. It joins what you already have.

bash stages/stage6/scripts/signals-lab.sh apply 6 helm
# 1. Metric: when, and how much?
Q 'sum by (status) (rate(http_requests_total{service="booking"}[5m]))'
# 2. Trace: where? (Step 6 command, same TRACE_ID)
curl -s localhost:13200/api/traces/$TRACE_ID | jq '.batches | length'
# 3. Log: what did the service say?
curl -sG localhost:13100/loki/api/v1/query_range \
--data-urlencode "query={namespace=\"apollo-airlines-apps\"} |= \"$TRACE_ID\"" \
| jq -r '.data.result[] | "\(.stream.service): \(.values[0][1])"'
SignalAnswersCan't answer
MetricThat booking errors rose, and since whenWhich request
TraceWhere in the call chain one request failed or waitedWhat the code was thinking
LogWhy, in the service's own words (Booking created, User check failed)Rates and trends
  • What joins them: the trace_id. It is in every span, and all five services write it, with span_id and request_id, into their request log lines. Time is the join between metrics and the other two.
  • The usual order: a metric or alert tells you something is wrong → a trace from that window shows which hop → logs for that trace_id give the detail.
  • Compared with Stage 5: the log field trace_id used to hold the X-Request-ID. Now it holds the real OpenTelemetry trace ID, and the request ID has its own request_id field. Both are parsed JSON fields, not Loki labels: query them with {namespace="apollo-airlines-apps"} | json | trace_id="<id>" or … | request_id="<id>". trace-test.sh checks that Loki returns lines carrying both IDs of its booking.
  • Watch out: not every failure logs. In the Step 4 drill, booking returns 502 Flight service unavailable without writing a log line. The trace's failed booking → flight span is the evidence.
  • The correlation chapter walks through more cases, including a notification failure under a successful booking.

Alert delivery and trusted edge probes​

A healthy frontend Pod does not prove that the public route works. The chart now adds Alertmanager, an in-cluster webhook receiver and Blackbox Exporter. An internal Probe checks the frontend Service. A separate HTTPS edge Probe checks the Gateway IP with the frontend hostname for TLS SNI and routing.

If you followed the incremental substages (Steps 2–7) above, install the complete Stage 6 observability snapshot containing Alertmanager, the webhook receiver, and Blackbox Exporter:

bash stages/stage6/scripts/apply.sh

Then verify the alert and probe deployments from the Apollo11 root:

export KUBE_CONTEXT=kind-apollo11
kubectl --context "$KUBE_CONTEXT" -n apollo-observability get deploy alertmanager alert-receiver blackbox
bash stages/stage6/scripts/edge-probe.sh
bash stages/stage6/scripts/observability-lab.sh

edge-probe.sh copies only the public certificate into observability; the private key stays in the application namespace. Rerun after certificate rotation or a Gateway IP change. This IP-targeted probe does not test workstation DNS. In Prometheus query probe_success: require both internal and edge series to equal 1. Missing series means discovery needs inspection. Query probe_ssl_earliest_cert_expiry to inspect certificate expiry.

observability-lab.sh saves and deletes the frontend HTTPRoute, requires the edge probe to fail, restores the route and requires success. Its exit trap restores the route if interrupted. A temporary synthetic alert then proves actual firing and resolved webhook delivery. This separates delivery evidence from the booking SLO's longer evaluation windows; run slo-lab.sh separately.

To inspect notifications and silences, open separate terminals:

kubectl --context "$KUBE_CONTEXT" -n apollo-observability port-forward svc/alertmanager 19093:9093
kubectl --context "$KUBE_CONTEXT" -n apollo-observability port-forward svc/alert-receiver 18090:8080

Open http://localhost:19093 and read curl -fsS http://localhost:18090/. During a firing SLO alert, add a short silence matching its alert name and inspect its suppressed state. Expire the silence and observe resumed delivery if the alert still fires. After recovery, require a resolved payload as well as a successful create/cancel booking. Alertmanager silence state is ephemeral; the receiver keeps only its last 100 payloads in memory.

Stage 7 carries these components and scripts forward; substitute stage7 in the paths when that snapshot is installed. Teardown removes Probes and the trust ConfigMap with the observability namespace.

Explain why internal success can coexist with edge failure, how a rule differs from notification routing, and what a silence suppresses.

When something looks wrong​

You seeLikely causeFirst command
ServiceMonitor exists, target missingSelector or port name doesn't match the Service, or monitor lacks app.kubernetes.io/part-ofkubectl get svc -n apollo-airlines-apps --show-labels; curl localhost:19090/api/v1/targets
Target listed but downPods gone or /metrics failingcurl -s localhost:19090/api/v1/targets | jq '.data.activeTargets[] | {job: .labels.job, lastError}'
apollo:booking_error_ratio:5m returns []No eligible bookings in the window (by design)Make a booking, wait 30–60 s
Grafana panel empty, Prometheus has dataWrong time range or datasource, or Grafana not readycurl localhost:13000/api/health
Old logs in Loki, no new onesAlloy not running on that nodekubectl get ds alloy -n apollo-observability
Bookings work, no new tracesCollector can't export to Tempokubectl logs -n apollo-observability ds/otel-collector --tail=20
Trace missing one serviceThat hop didn't forward traceparentCheck the service's outbound call uses the request context
signals-lab.sh refuses a substageYou went backwardsbash stages/stage6/scripts/teardown.sh --purge, then start again

The troubleshooting page has more.

What this stage does not solve yet​

Limitation you can see nowWhy it hurtsFixed in
Every search goes search → flight → flight-db, even for identical queriesRepeated work; the database sees the full read rateStage 7: Redis cache-aside
Replica counts are fixed per environment (dev 1, staging 2, prod 3)Too many Pods at night, too few in a spikeStage 7: HPA
Stage 4's CPU/memory requests were educated guessesWasted capacity or throttling, and nothing suggests better valuesStage 7: VPA recommendations
kubectl top returns nothingNo metrics-server on kindStage 7
Alerts fire but notify nobodyRouting, silence or receiver problemInspect Alertmanager alerts/silences and svc/alert-receiver payloads
Grafana allows anonymous access; its admin password is in values.yamlAnyone who reaches Grafana can read operations dataStage 8 (planned): Command Module (security)
One Prometheus, one Loki, one Tempo, on local PVCsTelemetry is lost if the node or volume isStage 9 (planned): Lunar Orbit, on real cloud storage
A rollout is gated only by readiness; nothing checks the error ratio before it continuesA bad release spends the error budget before anyone reactsStage 10 (planned): Argo Rollouts mission

The journey so far​

ConcernLaunchpadIgnitionStage 1Stage 2Stage 3Stage 4Stage 5Stage 6
Runs onOne Docker host3-node kindSameSameSameSameSameSame
Unit of deploymentCompose serviceBare PodDeploymentDeployment+ StatefulSetSameHelm releaseSame, + observability
Recoveryrestart:NoneReplicaSetSameSame+ probes restart / drain+ Argo CD self-healSame
Service discoveryDocker DNSPod IPService + DNS+ cross-namespace DNS+ headless ServicesSameSame+ ServiceMonitors
Entry pointports:port-forwardNodePortDNS → NodePort → Traefik + TLS → MetalLB → Envoy Gateway APIEnvoy GatewaySameSame+ grafana.apollo.local
Config / secretsenvironment:InlineConfigMap / SecretSameSameSameRendered from values+ observability: values
DataNamed volume—emptyDiremptyDirPVCsSameSame+ PVCs for Prometheus, Grafana, Loki, Tempo
Health checksCompose healthcheckNoneLiveness + readinessSameSameStartup / liveness / readinessSame+ SLO and alerts
ResourcesNoneNoneNoneNoneNoneRequests = limits, PDBsPer-env valuesSame
How it's deployeddocker compose upkubectl applyapply.shSameSameSameHelm / Kustomize / Argo CDSame, + signals-lab.sh
Observabilitydocker logskubectl logskubectl logsSameSameSameSameMetrics, dashboards, SLO, logs, traces
ScalingFixed—Fixed (2)FixedFixedFixedFixed per envFixed per env

Clean up​

pkill -f 'port-forward' || true
bash stages/stage6/scripts/verify.sh --mode helm # optional: the full automated check
bash stages/stage6/scripts/teardown.sh --purge # add --mode kustomize if you used it
kubectl get ns | grep apollo # nothing

--purge removes the app, UI and observability namespaces, their PVCs, the controllers and the Operator CRDs. The kind cluster stays for Stage 7.

You should now be able to explain​

  • Why Stage 5's /metrics could not be scraped, and what the code added.
  • Why a ServiceMonitor existing does not mean Prometheus is collecting.
  • Why a booking ID must never be a metric label.
  • What apollo:booking_error_ratio:5m measures, why 4xx are excluded, and why "no data" is not "100%".
  • Why a two-minute drill cannot prove a 28-day SLO.
  • Why finding old log lines doesn't prove log shipping works now.
  • How traceparent keeps one booking in one trace, and what happens when one hop drops it.
  • Which signal answers "since when", which "where", and which "why".

Next: Stage 7: Orbital Maneuvering uses these measurements to add a cache and autoscaling, and to prove whether they help.