Hi again, i'm trying to follow this guide to run k3s for my integration tests that are deployed via helm https://github.com/dagger/dagger/issues/5292
I know that i have to adjust the code to work with Container.asService but i'll get to that later. For now this basic snippet fails:
import sys
import anyio
import dagger
async def main():
async with dagger.Connection(dagger.Config(log_output=sys.stderr)) as client:
out = (
client.container()
.from_("rancher/k3s")
.with_entrypoint(["sh", "-c"])
.with_exec(["k3s server --snapshotter native"], insecure_root_capabilities=True)
)
k3s = await out.stdout()
print(k3s)
anyio.run(main)
Getting errors:
node_container_manager_linux.go:61] "Failed to create cgroup" err="cannot enter cgroupv2 \"/sys/fs/cgroup/kubepods\" with domain controllers -- it is in an invalid state" cgroupName=[kubepods]
kubelet.go:1466] "Failed to start ContainerManager" err="cannot enter cgroupv2 \"/sys/fs/cgroup/kubepods\" with domain controllers -- it is in an invalid state"
Using all the latest versions.
GitHub
What is the issue? Some users in discord (https://discord.com/channels/707636530424053791/1114570469958484008) have requested the ability to test kubernetes pipelines in Dagger. With the help of @v...
)