DEV Community

Alex Spinov
Alex Spinov

Posted on

Keptn Has a Free API — Cloud-Native Application Lifecycle Orchestration

Keptn: Orchestrate Your Entire Delivery Pipeline

Keptn is a cloud-native application lifecycle orchestrator that automates delivery and operations workflows. It connects your existing tools (Prometheus, Dynatrace, JMeter, Lighthouse) into an event-driven pipeline.

How Keptn Works

Keptn uses an event-driven architecture. Trigger a deployment, and Keptn orchestrates the entire flow: deploy → test → evaluate → promote/rollback. All automated, all auditable.

The Free API

Keptn exposes a full REST API:

# Trigger a delivery sequence
curl -X POST http://keptn-api:8080/api/v1/event \
  -H "x-token: $KEPTN_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "sh.keptn.event.delivery.triggered",
    "source": "manual",
    "data": {
      "project": "my-project",
      "service": "my-service",
      "stage": "production",
      "configurationChange": {
        "values": {"image": "my-app:v2.0"}
      }
    }
  }'

# Get evaluation results
curl http://keptn-api:8080/api/v1/event?type=sh.keptn.event.evaluation.finished \
  -H "x-token: $KEPTN_API_TOKEN" | jq .events[0].data.result

# List all projects
curl http://keptn-api:8080/api/controlPlane/v1/project \
  -H "x-token: $KEPTN_API_TOKEN"
Enter fullscreen mode Exit fullscreen mode

Quality Gates

The killer feature — automated quality gates based on SLOs:

apiVersion: spec.keptn.sh/0.1.6
kind: SLO
metadata:
  name: my-slo
spec:
  comparison:
    compare_with: single_result
    number_of_comparison_results: 1
  objectives:
  - sli: response_time_p95
    pass:
    - criteria: ["<600"]
    warning:
    - criteria: ["<800"]
  - sli: error_rate
    pass:
    - criteria: ["<1"]
  total_score:
    pass: 90%
    warning: 75%
Enter fullscreen mode Exit fullscreen mode

Real-World Use Case

A SaaS company was doing manual performance testing before each release — taking 4 hours per deployment. Keptn automated the entire flow: deploy to staging → run JMeter tests → evaluate against SLOs → promote or rollback. Deployment time dropped from 4 hours to 15 minutes.

Quick Start

helm repo add keptn https://charts.keptn.sh
helm install keptn keptn/keptn -n keptn --create-namespace

# Get API token
kubectl get secret keptn-api-token -n keptn -o jsonpath={.data.keptn-api-token} | base64 -d
Enter fullscreen mode Exit fullscreen mode

Resources


Need automated data collection for your SRE dashboards? Check out my tools on Apify or email spinov001@gmail.com for custom solutions.

Top comments (0)