Skip to main content
XenonStack

Cloud Native Applications

XenonStack Blog SLO-Based Multi-Stage Delivery with Keptn

| Published | Updated

SLO-Based Multi-Stage Delivery with Keptn
8:00

Key takeaway

  • SLO-based multi-stage delivery uses service level objectives as release gates. See how Keptn tasks and Analysis work today and what changed since v1.

SLO-based multi-stage delivery is a release approach in which each stage of a pipeline, such as build, test, staging and production, is allowed to proceed only when measured service level objectives (SLOs) are met. Keptn is an open-source project that supports this on Kubernetes by running checks around deployments and scoring SLOs, but the Keptn most older tutorials describe has been replaced.

This guide is for platform engineers, SREs and engineering leaders who want release decisions based on evidence rather than manual sign-off. It explains the SLO vocabulary, what Keptn offers today, how to design stage gates, and where AI agents fit.

What is an SLO, and why use it as a release gate?

Google's SRE book defines a service level indicator (SLI) as "a carefully defined quantitative measure of some aspect of the level of service that is provided", and an SLO as "a target value or range of values for a service level that is measured by an SLI". A service level agreement (SLA) is "an explicit or implicit contract with your users" with consequences attached (Google SRE book). If no explicit consequence exists, you are most likely looking at an SLO.

Used as a gate, an SLO turns a release question ("does this feel safe?") into a measurable one ("did latency and error rate stay within target during the test window?"). The same chapter advises starting from what users care about rather than what is easy to measure, keeping the number of SLOs small, and beginning with a loose target that you tighten later. It also describes an error budget, a rate at which SLOs may be missed, and says the gap between the observed violation rate and the budget can inform when to roll out new releases.

What is Keptn, and what changed since Keptn v1?

Keptn's current documentation describes it as helping with "cloud-native application lifecycle orchestration" and deployment validation (Keptn documentation). Many older articles describe the Keptn v1 control plane, which its own site presents as an event-based control plane for DevOps automation. That version is retired: its documentation site states "Keptn v1 reached EOL December 22, 2023" (Keptn v1 site).

TopicKeptn v1 (retired)Keptn today (stable docs)
StatusEnd of life on 22 December 2023Documented at keptn.sh/stable
StyleCentral control plane that used CloudEvents to drive delivery and operations automationKubernetes operators and custom resources: Lifecycle Operator, Metrics Operator
Building blocksMicroservice integrations that translated events into vendor APIsKeptnTaskDefinition and KeptnTask for checks before or after a pod is scheduled, and Analysis with AnalysisDefinition for SLOs
MigrationNot applicableThe stable docs include a "Migrating to Keptn" section and a page on migrating quality gates

If you have Keptn v1 in production, plan a migration rather than new work on it.

How do Keptn tasks and Analysis implement SLO gates?

Two building blocks matter for staged delivery. First, a KeptnTaskDefinition defines executables that Keptn runs in the pre-deployment phase ("before the pod is scheduled") or post-deployment phase ("after the pod is scheduled"). Each definition uses exactly one runner: a container, a Deno script or Python 3. You attach tasks to a workload with the annotations keptn.sh/pre-deployment-tasks and keptn.sh/post-deployment-tasks. Tasks at the same level run in parallel, because Keptn is not a pipeline engine (Keptn deployment tasks guide).

Two-column diagram of an SLO release gate. Before and during: define SLIs, set SLO targets, pre-deployment task, deploy to stage. After deployment: post-deployment task, run Analysis, score objectives, promote or hold.

Second, an AnalysisDefinition holds the objectives for an Analysis. Each objective references an AnalysisValueTemplate that holds the SLI query, and sets failure or warning criteria, a weight and whether it is a key objective, meaning "its failure fails the Analysis". The totalScore block sets pass and warning thresholds as percentages of the weighted objectives. An Analysis resource sets a timeframe such as recent: 5m, and its result is exposed as an OpenTelemetry metric that tools such as Grafana can display (Keptn SLO guide).

Target values use Kubernetes quantities, not floats, so write 3m rather than 0.003; the guide warns that float values cause "Invalid value" errors. Metrics come from a provider you configure through a KeptnMetricsProvider, and Prometheus is a common source of the SLI queries.

How should you design stage gates?

StageQuestion the gate answersExample SLI inputs
Build and unit testIs the change safe to package?Test pass rate, build checks
Integration or test environmentDoes it meet functional and load targets?Error rate, latency, saturation under test load
StagingDoes it behave like production under realistic traffic?Availability, latency, key business transactions
Production rolloutIs the new version healthy for real users?Error rate and latency compared with the agreed SLO, remaining error budget

Give each stage its own objectives, mark the few that must never fail as key objectives, and keep warnings for objectives that deserve attention but should not block. Because Keptn tasks run in parallel at one level, keep your CI or CD tool as the owner of ordering, and let Keptn supply the pre-deployment checks and the post-deployment analysis.

What are the advantages and trade-offs?

  • Clear evidence. A release decision records which objectives passed, warned or failed.
  • Shared language. Developers, operators and business owners discuss the same targets.
  • Setup effort. You need reliable metrics, defined SLOs and Kubernetes-native resources before the gates mean anything.
  • Metric quality. A gate is only as good as its SLI queries. Poor data leads to wrong decisions.
  • Culture. Teams must accept that a failed objective stops a release.

How do AI agents change SLO-based delivery?

Agents can do the slow parts of this practice: drafting candidate SLIs from service history, reading Analysis results, summarising why a stage failed and opening the follow-up work. The decision to promote or hold a release should stay inside written policy, with the objectives, thresholds and approvers recorded, so that an agent acts within limits you can audit. To build and run agents for DevOps and delivery automation, see ElixirClaw, the AI agents computing platform.

What should you do first?

  1. Pick one user-facing service and define two or three SLIs that reflect what users notice.
  2. Set loose SLO targets and an error budget, and agree who owns the decision when it is spent.
  3. Check whether you run Keptn v1; if so, start a migration to the current release.
  4. Add one pre-deployment task and one Analysis to a single workload in a non-production stage.
  5. Review failed and warned analyses weekly, then tighten targets or fix the metric queries.

To map one release decision your agents make, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

What is SLO-based delivery?

It is a way of releasing software in which each stage proceeds only if measured service level objectives are met, so decisions rest on evidence such as error rate and latency rather than manual judgement.

Is Keptn v1 still supported?

No. The Keptn v1 site states that Keptn v1 reached end of life on 22 December 2023. The current documentation covers lifecycle orchestration, deployment tasks and Analysis, and includes migration pages.

How does Keptn evaluate an SLO?

An AnalysisDefinition lists objectives that each reference an SLI query. An Analysis runs those queries over a timeframe and reports each objective as passed, warned or failed, scored against pass and warning thresholds.

Is Keptn a CI/CD pipeline tool?

No. Its documentation says Keptn is not a pipeline engine, and tasks at the same level run in parallel. Use your CI or CD tool for ordering and use Keptn for checks and analysis around deployments.

How do you choose SLO targets?

Start from what users care about, keep the number of SLOs small and begin with a loose target that you tighten over time, as the Google SRE book advises.

Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.

Ready to put AI agents to work? Explore ElixirClaw, the agentic OS platform to build, orchestrate and govern AI agents.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue