Tekton

CI/CD as Kubernetes Custom Resources. Task, Pipeline, PipelineRun, TaskRun. Tekton Catalog for reusable Tasks. Powers OpenShift Pipelines, Jenkins X, Google Cloud Build (post-2023 rebuild). The K8s-native answer to "should pipelines be CRDs?"

Overview

Tekton: CI/CD as Kubernetes resources

Tekton is Kubernetes-native CI/CD: pipelines are defined as CRDs (Custom Resource Definitions, the way Kubernetes lets you add your own resource types) and run by a Kubernetes controller. It started at Google as part of the Knative project and was donated to the CD Foundation (CDF) in 2019. It now powers Google Cloud Build (rebuilt on Tekton in 2023), OpenShift Pipelines (Red Hat's CI/CD) and Jenkins X.

The moving parts fit together in two paths. On the first path, your Tasks, Pipelines and Triggers live in Git as YAML, and Argo CD or Flux applies them to the Kubernetes API. On the second path, a webhook arrives at an EventListener, which creates a PipelineRun. Both paths meet at the Tekton controller, which watches the API and starts TaskRun pods to do the work.

The pitch: if you already run Kubernetes, treating pipelines as Kubernetes resources keeps operations in one place. kubectl apply, get and describe work on Pipelines and PipelineRuns. RBAC, NetworkPolicy and ResourceQuota apply to them the same way they apply to everything else. Argo CD or Flux manage Tekton resources through GitOps.

Key concepts

  • Task — reusable unit
  • Pipeline — DAG of Tasks
  • PipelineRun — runtime instance
  • Workspaces — volumes across Tasks
  • Tekton Triggers — event-driven
  • Recipe: PipelineRun pruning + history
  • Recipe: GitOps-managed Tekton with ArgoCD

Interview questions

  • When is Tekton the right choice over GitHub Actions?
  • Walk through a production Tekton setup — install, Tasks, Triggers, monitoring.
  • Compare Tekton vs Argo Workflows — when do you pick each?
  • Quick-fire interview answers — Tekton essentials.
  • How do you handle a Tekton PipelineRun that's stuck or running too long?

Sign up free to read the full topic

More DevOps topics

Start free on Cariara · Coding problems · System design studio