#marcosnils 3545 do you know of any
1 messages ยท Page 1 of 1 (latest)
๐ - just looking for shortcuts. ๐ I guess I can build an image that runs a Dagger pipeline, push it, and run it as a pod?
not even sure how engine provisioning will work in that case, tbh
maybe @last herald or @frigid finch can provide anything that for that?
I'd assume you could also start a pod by exporting the dagger engine TCP port and use the tcp connection interface from your machine? https://github.com/dagger/dagger/blob/main/core/docs/d7yxc-operator_manual.md#connection-interface
@river radish looks like instructions should be very similar to this one: https://github.com/moby/buildkit/blob/db6342f9fa9b69d0da517d776e619b8de221de2f/examples/kubernetes/README.md?plain=1#L19
concurrent, cache-efficient, and Dockerfile-agnostic builder toolkit - buildkit/README.md at db6342f9fa9b69d0da517d776e619b8de221de2f ยท moby/buildkit
oh wow! kube-pod uses kubectl to establish the connection to the engine pod. its' even easier
using the kube-pod connection interface should be straightforward: https://github.com/moby/buildkit/blob/db6342f9fa9b69d0da517d776e619b8de221de2f/client/connhelper/kubepod/kubepod.go#L2
- Start a pod with the engine
- Use the
kube-podconnection interface to run your pipeline against that pod from your local machine
I'm assuming @flint basalt might have tips on this as well
i'm not sure if we support kube-pod in the Go SDK, but I think I can probably reproduce this without even using dagger, so I can try that with plain old buildkit if not. thanks! ๐
according to this: https://github.com/dagger/dagger/blob/main/core/docs/d7yxc-operator_manual.md#connection-interface my understanding is that we do support it
oh nice 
I've done some work with Dagger in k8s (as has @potent cosmos), but I'm currently using Docker-in-Docker (so running dagger in Docker in a k8s pod)...
Planning on changing that up soon, though.
got it working! but it doesn't reproduce the issue. probably need to try this against a real k8s cluster. I can try GKE or something next, since I'm somewhat familiar with it.
for posterity, here's my pod + env setup:
apiVersion: v1
kind: Pod
metadata:
name: dagger
spec:
containers:
- name: dagger
image: registry.dagger.io/engine:v0.3.13
securityContext:
privileged: true
$ kubectl apply -f dagpod.yml
$ export _EXPERIMENTAL_DAGGER_RUNNER_HOST=kube-pod://dagger
$ go run main.go
i kubectl exec'd into the pod and confirmed it was running everything there.
nice! Which non-real k8s cluster did you use? kind, mini-kube, k3s, docker-desktop-k8s?
kind
- name: setup k3s
run: |
curl -sfL https://get.k3s.io | K3S_KUBECONFIG_MODE="644" sh -s -
kubectl version
- run: |
kubectl apply -f dagpod.yml
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=kube-pod://dagger
go run main.go
env:
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
It could be easy to setup k8s/k8s-like in github action.