Okay, so I found solution for my problem above, bu...
# k3s
g
Okay, so I found solution for my problem above, but maybe someone can tell me if and how it would be possible to change runtime from runc to crun in existing cluster?
c
we don’t support crun
or at least we don’t ship with it, you’d need to install it yourself on all your nodes and put it in the correct path
g
there is crun on the host (shipped together with podman) but I guess it is on wrong path then?
c
if you’ve done that, then setting it to be the default runtime should work… but you’ll still need to manually delete all the existing pods if you want them switched over to it.
you can check the containerd config to see if it is detected
it needs to be in the $PATH for the service to be found
g
Copy code
cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep crun
  default_runtime_name = "crun"
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.'crun']
[plugins.'io.containerd.cri.v1.runtime'.containerd.runtimes.'crun'.options]
  BinaryName = "/usr/bin/crun"
Does this mean it found it?
c
yep
what doesn’t work when you try to change the default runtime?
it looks like the setting is in there
g
Everything works, but still under runc apparently
while the runtime is set from the beginning of node existence
c
what are you seeing that suggests its still using runc
g
Copy code
cat /var/lib/rancher/k3s/agent/etc/containerd/config.toml | grep runtime_type
  runtime_type = "io.containerd.runc.v2"
  runtime_type = "io.containerd.runhcs.v1"
  runtime_type = "io.containerd.runc.v2"
and I see processes ending with
containerd-shim-runc-v2
c
that is just the type. that does not determine what runtime binary is actually used.
g
okay, so maybe it actually uses crun, I kinda eexpected the
containerd-shim-runc-v2
to be gone
c
no that does not change
g
ok, so thx for help, I will try read on how that stuff works
c
what are you hoping to get out of using crun? it sounds like you’re not quite sure what to look for.
g
I was reading it is faster, more lightweight. Also I like to tinker with stuff.
c
note that even in the example config for crun provided by upstream, it still uses the runc.v2 runtime type. That is because crun has the same calling api as runc. https://github.com/containerd/containerd/blob/v2.1.3/docs/cri/config.md?plain=1#L97-L101
👀 1
other things have different types but crun does not