Skip to main content

Run Dagger on Kubernetes


This guide outlines how to run, and connect to, the Dagger Engine on Kubernetes.


This guide assumes that you have:

  • The Dagger CLI installed locally.
  • Helm v3.x available locally.
  • A running Kubernetes cluster (tested with Kubernetes v1.28).

Step 1: Deploy Dagger with Helm

Deploy Dagger on your Kubernetes cluster with Helm:

helm upgrade --install --namespace=dagger --create-namespace \
dagger oci://

Wait for the Dagger Engine to become ready:

kubectl wait --for condition=Ready --timeout=60s pod \
--selector=name=dagger-dagger-helm-engine --namespace=dagger

You can find more information on what was deployed using the following command:

kubectl describe daemonset/dagger-dagger-helm-engine --namespace=dagger

Step 2: Connect Dagger CLI to Dagger Engine pod

Get a Dagger Engine pod name:

DAGGER_ENGINE_POD_NAME="$(kubectl get pod \
--selector=name=dagger-dagger-helm-engine --namespace=dagger \

Next, set the _EXPERIMENTAL_DAGGER_RUNNER_HOST variable so that the Dagger CLI knows to connect to the Dagger Engine that you deployed as a Kubernetes pod:


Finally, run an operation that shows the kernel info of the Kubernetes node where this Dagger Engine runs:

dagger query <<EOF
container {
from(address:"alpine") {
withExec(args: ["uname", "-a"]) { stdout }

This is what a successful response should look like:

│ ▽ init
│ █ [0.64s] connect
│ ┣ [0.52s] starting engine
│ ┣ [0.12s] starting session
│ ┃ OK!
│ ┻
[2.44s] dagger query
[0.00s] loading module
[2.44s] query
"container": {
"from": {
"withExec": {
"stdout": "Linux buildkitsandbox 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64 Linux\n"
│ ▽ from alpine
│ █ [1.26s] resolve image config for
│ █ [0.18s] pull
│ ┣ [0.03s] resolve
│ ┣ [0.61s] ███████████████████ sha256:c926b61bad3b94ae7351bafd0c184c159ebf0643b085f7ef1d47ecdc7316833c
│ ┣ [0.18s] extracting sha256:c926b61bad3b94ae7351bafd0c184c159ebf0643b085f7ef1d47ecdc7316833c
│ ┣─╮ pull
│ ┻ │
█◀──╯ [0.24s] exec uname -a
┃ Linux buildkitsandbox 6.1.0-12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.52-1 (2023-09-07) x86_64 Linux

• Engine: dagger-dagger-helm-engine-bvbtk (version v0.9.3)
3.10s ✔ 12

The line above starting with Engine: confirms the Dagger Engine that the CLI connected to.

To double-check that the operations are running on the Kubernetes cluster, follow the pod logs:

kubectl logs pod/$DAGGER_ENGINE_POD_NAME --namespace=dagger --follow


This guide demonstrated the simplest approach to using Dagger on Kubernetes. For more complex scenarios, such as setting up a Continuous Integration (CI) environment with Dagger on Kubernetes, use the following resources:


If you need help troubleshooting your Dagger deployment on Kubernetes, let us know in Discord or create a GitHub issue.