-
I'm currently working on integrating Longhorn to a Terraform based Talos deployment and I'm just wondering why this extra mounts for Kubelet are needed according to the Longhorn Talos documentation: machine:
kubelet:
extraMounts:
- destination: /var/lib/longhorn
type: bind
source: /var/lib/longhorn
options:
- bind
- rshared
- rw They say:
I'm trying to understand the background behind this requirement. Why does Kubelet need access to these paths when Longhorn already has access to the host path? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When a container is started with a In Talos Linux, But
|
Beta Was this translation helpful? Give feedback.
When a container is started with a
hostPath
mount, the actual mount operation is performed by thecontainerd
(via CRI plugin), which run on the host in the host namespace (including mount namespace). So in terms of actual mount operation,kubelet
is not involved into that.In Talos Linux,
kubelet
itself runs in a container in a different mount namespace, so by default it doesn't see mounted user disks (volumes), neither it sees full contents of/var
directory. For most basic volume mount, this is fine, askubelet
doesn't need to inspect the mount source or do anything about it.