Skip to content

how to allow shared mounts for docker daemon (systemd flag MountFlags=shared)? #1408

Discussion options

You must be logged in to vote

I found the solution.

  1. First step was to realize that k3s uses containerd instead of docker.
  2. Then you need to understand the k3s config for containerd, which is template based,
  3. and finally we need to copy the whole default template, because the config key cannot be duplicated (but is already part of the default config)

Hence the solution looks like

preinstall_exec = [
    # enabling MountFlag shared for csi-s3
    # adapted from https://docs.k3s.io/advanced#configuring-containerd and chatgpt
    <<-EOT
    mkdir -p /var/lib/rancher/k3s/agent/etc/containerd
    cat > /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl <<'END'
    {{- /* copying the default template from respective …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mysticaltech
Comment options

Answer selected by schlichtanders
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants