Of course we cannot always share details about our work with customers, but nevertheless it is nice to show our technical achievements and share some of our implemented solutions.
On dev environments sometimes a simple LXC or VM is powered on with a single partition: Everything is running in the root partition. This is not a wise choice on production systems, but on fire-and-forget machines this is a common practice.
However when deploying a Kubernetes cluster (using Rancher 2), this seems to cause problems.
The error message shows:
Error response from daemon: path /var/lib/rancher is mounted on / but it is not a shared mount]
To overcome this error message, the root partition needs to be mounted using the --make-rshared parameter. This does not remount the partition itself and can be done during runtime:
root@kube3:~# mount --make-rshared /
To overcome a reboot, the command can be added in /etc/rc.local:
root@kube3:~# cat <
#!/bin/bash
mount --make-shared /
exit
EOF
root@kube3:~# chmod 755 /etc/rc.local
The cluster provisioning should be able to continue after this adjustment.