The Simplest Way to Make Crossplane and Tekton Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Crossplane and Tekton work together inside Kubernetes to build cloud parts and deploy code. Tekton runs your build pipelines while Crossplane creates the databases and buckets your apps need. Many teams struggle when they link these two tools in production. Build tasks often start before cloud databases finish setting up. Teams also share broad admin keys across both tools to save time. You can fix this by scoping roles and checking resource readiness before pipelines run. How crossplane and

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

Crossplane and Tekton work together inside Kubernetes to build cloud parts and deploy code. Tekton runs your build pipelines while Crossplane creates the databases and buckets your apps need.

Many teams struggle when they link these two tools in production. Build tasks often start before cloud databases finish setting up. Teams also share broad admin keys across both tools to save time. You can fix this by scoping roles and checking resource readiness before pipelines run.

How crossplane and tekton share roles and data

Both tools run as controllers inside your Kubernetes cluster and use custom resources. Tekton runs step-by-step tasks to test code, build images, and set up apps. Crossplane watches cluster files and talks to cloud providers to build servers or databases.

In a standard flow, a Tekton task writes a resource request to the cluster. The cluster checks the Tekton service account role to allow or block the write. Crossplane reads that new request and logs in to the cloud provider API. It uses its own cloud provider key to create the database or storage bucket.

Once the cloud part is ready, Crossplane writes the login details to a secret. A later Tekton step reads that cluster secret to run database migrations or tests. Data flows through cluster secrets and status fields rather than direct network calls. This keeps the pipeline runner separate from the cloud provider account.

Common failure modes and how to scope roles

The biggest risk is giving Tekton a broad cluster admin role. If a pipeline has full rights, any task can read all cluster secrets. A bad script in a code repo could steal cloud keys owned by Crossplane. Shared service accounts also make it hard to see which pipeline changed a resource.

Crossplane Composition Security + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another common issue is running pipeline steps without waiting for cloud setup to finish. Cloud databases take several minutes to start, while pipeline tasks start in seconds. If Tekton runs a migration right away, the task fails because the database is offline. Unlogged database tasks inside pipelines also hide who ran what query during a release.

To fix permissions, give each Tekton pipeline its own small service account. Allow that account to create only specific Crossplane claim types in one namespace. Block Tekton from reading the core provider keys that Crossplane uses for cloud APIs. Use a wait step in your pipeline to check the resource status field first.

Only start app deploy steps after Crossplane marks the new cloud resource as ready. Limit network paths so build pods can only reach the databases they need. Keep clear audit logs for every database query and cluster change during the run. When data masking rewrites emails or card numbers in results, test logs stay safe.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.

First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should Tekton create Crossplane claims or managed resources?

Tekton should create namespace claims rather than cluster-wide managed resources. Claims let you keep pipeline roles small and restricted to a single team namespace.

How does Tekton know when a Crossplane resource is ready?

Crossplane updates a status condition on the resource once the cloud setup finishes. A Tekton task can watch this status field and wait until it reports ready.

How do we keep database secrets safe during pipeline runs?

Crossplane writes database keys into a scoped secret inside the app namespace. Give only the specific deploy task permission to read that single secret.

The query runs. The emails stay hidden.