PyratLabs / ansible-role-k3s

Ansible role for installing k3s as either a standalone server or HA cluster.
BSD 3-Clause "New" or "Revised" License
627 stars 135 forks source link

how can i config containerd config.toml.tmpl. #204

Closed baozitao closed 1 year ago

baozitao commented 1 year ago

i want change containerd native images store dir from /var/lib/containerd to /path, but i don’t know how to do.

onedr0p commented 1 year ago

This might be helpful @baozitao https://github.com/k3s-io/k3s/issues/2068 and https://github.com/k3s-io/k3s/discussions/6675 and https://docs.k3s.io/advanced#configuring-containerd

I would investigate more if you can do this without any changes to the role. But by the looks of it you can just pass in data-dir to the server and agent, e.g.

---
k3s_server:
  data-dir: /path

and

---
k3s_agent:
  data-dir: /path