The Simplest Way to Make Cilium and Tekton Work Like They Should
Using cilium and tekton together lets teams run isolated build pipelines inside Kubernetes clusters. Tekton runs build tasks as pods while Cilium enforces kernel-level network rules on every packet. This pairing lets engineering teams build, test, and ship container images inside one cluster. You do not need external build servers when your cluster controls pod traffic. How cilium and tekton share roles and traffic Tekton breaks every build pipeline into smaller steps that run inside separat
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.
Using cilium and tekton together lets teams run isolated build pipelines inside Kubernetes clusters. Tekton runs build tasks as pods while Cilium enforces kernel-level network rules on every packet.
This pairing lets engineering teams build, test, and ship container images inside one cluster. You do not need external build servers when your cluster controls pod traffic.
How cilium and tekton share roles and traffic
Tekton breaks every build pipeline into smaller steps that run inside separate Kubernetes pods. Each pod uses a Kubernetes service account to read code and push built images.
Cilium watches the Kubernetes API to learn the labels and service account of each pod. It turns these pod traits into network identities inside the Linux kernel using eBPF.
When a Tekton task starts, Cilium checks its network identity before any traffic leaves. Network rules in Cilium decide which git servers, registries, or databases the build pod reaches.
Data flows from the source repo into the Tekton pod over allowed network paths. After the build finishes, the pod pushes the output to your image registry.
Cilium logs every network flow by pod identity rather than by temporary IP address. Since build pods start and stop fast, IP logs alone fail to track traffic.
Common failure modes and how to scope network paths
Many teams assign one shared service account to every Tekton pipeline in a namespace. This mistake gives simple lint tasks the same network reach as production deploy tasks.
If an untrusted test script runs in that namespace, it inherits broad network rights. It can reach internal databases or cloud metadata services if rules stay too wide.
Another common issue happens when teams use broad tokens that never expire inside tasks. A single leaked build secret then puts every target database and registry at risk.
End-to-End Encryption + Cilium Network Policies: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Unlogged database queries during deployment steps also create blind spots for security teams. You might see that a pod opened a port, but not what it changed.
To fix this, give each Tekton task type its own dedicated Kubernetes service account. Create one role for code clones, one for image pushes, and one for deploys.
Next, write Cilium network rules that match those exact service accounts and task labels. Start with a default deny rule for the entire build namespace to block stray traffic.
Allow DNS lookups and outbound traffic only to approved git hosts for build pods. Keep database ports closed to all pods except the specific migration task pod.
Managing DNS rules and cluster build state
Tekton pipelines often pull packages from public registries during build steps. Static IP rules break fast because public package hosts change their IP addresses often.
Cilium solves this by filtering outbound traffic based on domain names in DNS queries. You can write a rule that lets build pods reach only specific package domains.
When a task pod asks for a domain, Cilium checks the DNS response first. If the domain matches your allow list, the kernel opens the path right away.
Teams also need to protect the storage volumes that pass files between Tekton steps. Keep build pods in dedicated namespaces so other apps cannot read shared workspace disks.
Review your Cilium flow logs each week to find blocked packets from build pods. Dropped packets show either a broken build rule or a bad script probing your network.
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
Why do Tekton pods fail to pull code after adding Cilium rules?
Default deny rules often block cluster DNS pods by mistake. Make sure your Cilium rule allows outbound traffic to the cluster DNS service first.
How should we separate build tasks from deploy tasks in the network?
Assign separate Kubernetes service accounts to build tasks and deploy tasks. Match those accounts in Cilium rules so only deploy pods reach target app namespaces.
Does Cilium slow down short Tekton task pods at startup?
Cilium attaches network identities as the pod starts, which takes a moment under heavy load. Keep your rule sets small and clean so identity setup stays fast during builds.
Related guides
In this post