The Simplest Way to Make Dagster and Linkerd Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running dagster and linkerd together adds mutual TLS encryption to your data pipelines in Kubernetes. This setup lets data teams run scheduled jobs while the service mesh checks every network call. Data platforms need strict rules for how pods talk to each other. Dagster schedules and runs data jobs across many worker pods inside a cluster. Linkerd sits next to these pods as a sidecar container. It encrypts traffic and tracks network calls between the web server, daemon, and workers. When you p

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.

Running dagster and linkerd together adds mutual TLS encryption to your data pipelines in Kubernetes. This setup lets data teams run scheduled jobs while the service mesh checks every network call.

Data platforms need strict rules for how pods talk to each other. Dagster schedules and runs data jobs across many worker pods inside a cluster. Linkerd sits next to these pods as a sidecar container. It encrypts traffic and tracks network calls between the web server, daemon, and workers. When you pair them, you get clear metrics and strong network identity for every job.

How dagster and linkerd handle traffic and permissions

In a standard cluster, the Dagster daemon starts a new Kubernetes job for each run. The control plane sends code locations and run details over gRPC to worker pods. When Linkerd joins this flow, it puts a tiny sidecar into each pod. Every gRPC call between the daemon and the code server goes through this sidecar.

Linkerd uses Kubernetes service accounts to build cryptographic identities for each pod. It checks these identities before it lets two pods talk to each other. The mesh encrypts the data in transit without needing changes to your pipeline code. Platform teams can write network rules that only let the Dagster daemon call specific worker pods. Other apps in the cluster cannot talk to the code servers.

Data flow stays fast because the sidecar runs inside the same pod network namespace. The worker pod reads from databases and writes results to storage buckets. Meanwhile, Linkerd logs TCP traffic metrics and gRPC success rates for the platform team.

Common failure modes in batch jobs and how to fix them

The biggest issue with this pair happens when a data job finishes its work. A Dagster run pod completes its task and tries to shut down right away. Still, the Linkerd sidecar stays alive because it waits for more network traffic. Kubernetes sees one container still running and marks the job as active forever.

Modern Kubernetes clusters fix this by running the mesh sidecar as a native sidecar container. This setup tells the cluster to stop the sidecar as soon as the main job finishes. Teams on older clusters must send a shutdown signal to the local sidecar admin port.

End-to-End Encryption + Linkerd Security Features: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Another common failure mode involves shared service accounts across different data teams. If every worker pod uses the same service account, Linkerd gives them all the same identity. A test pipeline could then call production code servers or read sensitive database tables. You should give each data team and pipeline its own Kubernetes service account. Then you can write strict Linkerd authorization policies for each role.

Unlogged database queries also create blind spots during pipeline runs. Linkerd tracks pod-to-pod traffic, but worker pods often talk to external databases using shared keys. If a job runs a bad query, the mesh logs only show a TCP stream. You must scope database roles per pipeline and log all queries at the database level. Also, consider masking sensitive fields like emails, phone numbers, and card numbers in query results. Masking rewrites matched fields in results so logs do not leak private data.

Scoping network paths for multi-tenant data teams

Large teams often share one Dagster instance across finance, marketing, and product groups. You can separate their code servers into different Kubernetes namespaces. Linkerd makes it easy to block cross-namespace calls by default.

You can write a policy that only lets the central daemon reach code servers. Worker pods in the finance namespace cannot reach pods in the marketing namespace. This layout stops a broken script in one project from hurting other teams. It also gives security teams a clear map of every allowed network path.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Why do my Dagster run pods hang after the job finishes?

The main job container stops, but the Linkerd sidecar keeps running and blocks pod shutdown. Use native Kubernetes sidecar containers so the cluster stops the sidecar when the job ends.

Does Linkerd slow down gRPC calls between the daemon and code servers?

Linkerd adds a tiny delay of a few milliseconds to encrypt and route gRPC calls. For batch data jobs, this small network cost does not change total run times.

How do I stop one team's pipeline from calling another team's code server?

Put each team in its own namespace with a dedicated Kubernetes service account. Then use Linkerd authorization policies to only allow traffic from the central Dagster control plane.

The query runs. The emails stay hidden.