I use lxc instances to be Kubernetes hosts to set up a testbed to imitate a production environment. And choose calico which runs proxy on eBPF to be CNI. The calico node pod needs both /sys and / of the host to have shared propagation property to create shared mount points /sys/fs/bpf and /var/run/calico with the host. Here is my work note: https://www.yuque.com/wucheng-k7017/oz5hh9/eg2nkh?singleDoc# 《Setup a production-like testbed based on LXD and Kubernetes》
Both / and /sys in lxc instances launched from ubuntu/22.04 have private propagation property, even if lxc.mount.auto has set sys:rw. I walk around this problem by /etc/fstab in lxc instance or command “mount --make-shared /”.
Are there some ways to config those lxc instances to share their / and /sys?