#Accessing k3s from the host

1 messages · Page 1 of 1 (latest)

topaz totem
#

@valid scroll if I want to run k3s using your module then connect to it from my host do I have to expose the API server port 6443?

Can that be done from this command alone?

# Start k3s
$ dagger -m github.com/marcosnils/daggerverse/k3s@v0.1.8 call --name test server up

# Get kubeconfig
$ dagger -m github.com/marcosnils/daggerverse/k3s@v0.1.8 call --name test config --local export --path kubeconfig
$ kubectl --kubeconfig kubeconfig get nodes

?

valid scroll
#

Is it not working for you?

topaz totem
#

Nope I can't see dagger creating the tunnel.

#

Is WithExposedPort(6443) necessary?

topaz totem
#

That appears to be the thing that was stalling the above command from creating the tunnel

valid scroll
#

it's been a recent change in Dagger I forgot about

#

when updating my module

#

gimme 2 mins, fixing

topaz totem
#

@valid scroll is there anyway to persist the k3s cluster state between runs of server up?