Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

SRE and Kubernetes operations: routine, runbooks, SLOs

By updated

Improve this page

Structured operations anticipate incidents instead of suffering them. The Site Reliability Engineering, or SRE, approach applied to Kubernetes rests on three pillars: an operations routine that covers the essential checks, intervention procedures that capitalize on resolved incidents, and numerical service objectives that make reliability observable.

What you will learn

  • Apply a daily, weekly and monthly operations routine
  • Recognize the characteristics of a good runbook
  • Define an SLI, an SLO and the error budget that follows from them
  • Choose which level to start with, and which guides to go to for runbooks and SLOs

The three levels of structured operations

Each level builds on the previous one: the routine detects, the runbook guides the response, the SLO measures the result.

Level 1: the operations routine

Regular rituals to detect degradations before they become incidents:

  • Daily: state of the nodes, failing Pods, consumption of critical resources, active alerts
  • Weekly: cleanup of orphaned resources, review of events, check of certificates close to expiry, audit of obsolete images
  • Monthly: review of quotas, RBAC audit, secret rotation, restore test

Level 2: runbooks

A runbook is a documented procedure for a type of recurring incident. It answers: What do we do if X happens?

A good runbook has these characteristics:

  • A precise trigger: an alert or a symptom, never a generic case
  • Actions in order, with the exact commands
  • Explicit success criteria
  • Documented escalation if the procedure fails

Level 3: SLOs and SLIs

An SLI (Service Level Indicator) measures the reliability of a service: error rate, p99 latency, availability.

An SLO (Service Level Objective) sets the target: "99.5% of requests answer in under 500 ms over 30 days".

The error budget (100% - SLO) defines the margin for experimentation that is acceptable before reliability takes priority over new features.

Where do these three levels go in practice?

The first level has its own guide in the course: the operations routine details the daily, weekly and monthly checks that keep a cluster healthy, and it is the routine you should start with.

The other two levels are practised in the lab of the “Put it into practice” section: it has you write a first runbook and compute an SLO on a cluster. To go further, three pages of the site do not depend on Kubernetes. The page Runbooks (in French) shows how to write them, and the guide Runbooks and incident response how to link them to your alerts. SLOs and the error budget are covered in depth in SLI, SLO and error budget (in French), with alerts on how fast the budget is being consumed (the burn rate).

Put it into practice

The lab covers the two levels that call for something written, the runbook and the SLO. A new image has broken the catalogue application: you put it back in service on its last good image, then you write the runbook that will do it again next time, in a single command. This runbook must look at the state before acting: run against a service that works, it changes nothing.

You then compute, from a 30-day log kept by a probe, the measured availability (the SLI) and the remaining error budget against a 99.5% objective, and record them in a ConfigMap. The validation breaks the application again to replay your runbook, runs it again on a healthy service, then recomputes the SLI and the budget from the same log.

Key takeaways

  • Reactivity is expensive: every unanticipated incident costs more than the routine that would have prevented it
  • Runbooks reduce MTTR (Mean Time To Recover) by removing improvisation under stress
  • An SLO without an error budget is not actionable: the error budget is the mechanism that makes SLOs useful
  • Start simple: one morning check, one runbook for CrashLoopBackOff, one availability SLI, then iterate
  • Kubernetes provides the primitives (events, metrics-server, readiness probes); it is up to operations to put them to use

Knowledge check

Check that you have understood the essentials of this guide. The questions only cover what was just explained here.

Knowledge check

Check what you have learned with this interactive quiz

6 questions
6 min
70% to pass

How it works

  • The timer starts when you click Start
  • Multiple choice, true/false and short answer questions
  • You can move between questions
  • Detailed results are shown at the end

Starts the quiz and the timer