This message was deleted.
# general
a
This message was deleted.
c
Yes, this is documented on the containerd side.
w
Thx for your response! I was actually referring to the mechanism k3s has in place to customize the containerd config (through the template
config.toml.tpl
). See this section in the docs: https://docs.k3s.io/advanced#configuring-containerd. It's not clear how to pass the
ExtraRuntimes
to the template.
c
you can’t customize that list. The extra runtimes discovered automatically by k3s are hardcoded. https://github.com/k3s-io/k3s/blob/master/pkg/agent/containerd/nvidia.go#L31-L39
If you want to add your own, you need to put them in the template as plain text blocks in the correct format for containerd to use.
👍 1
so right after the final
{{end}}
just put
Copy code
[plugins.cri.containerd.runtimes."foo"]
  runtime_type = io.containerd.runc.v2
[plugins.cri.containerd.runtimes."foo".options]
  BinaryName = foo
w
Thx a lot! That's exactly how we are doing it now 🙂 Since I saw the option in the template, I was just wondering if it could be achieved without modifying the template.
c
no, the nvidia ones are the only things that are added automatically
and we don’t inject RuntimeClasses for them, so you still have to do that on the kubernetes side
that might be something to put in as an enhancement request
just out of curiosity, what runtime are you adding?
w
The nvidia-container-runtime 🙂 so I'm a bit surprised it's added automatically... never saw it.
c
oh yeah, should be there for you then, as long as the binaries are in the expected location
w
Cool, thx for the link to the issue. Helped me a lot!