Hi When I bind an external folder to Kubelet via the extra_binds
option, the binds are created with the default rprivate
mount propagation option, which makes any host-originating mounts in that folder invisible to Kubelet - and pods mounting it, even if they use mountPropagation: HostToContainer
. You can check it by inspecting the Kubelet container:
# docker container inspect kubelet
"Mounts": [
{
"Type": "bind",
"Source": "/local",
"Destination": "/local",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
...
This is the result of cluster.yaml
containing this config:
services:
kubelet:
extra_binds:
- "/local:/local"
Hereโs how to do it in Docker: Use bind mounts | Docker Documentation
But how do I tell Rancher to bind the folder with an rslave
or rshared
option instead of rprivate
?