LXC: setup kubernetes problems

KevinGoos

Member
May 24, 2019
14
0
21
32
I am trying to get my single node kubernetes cluster running inside an LXC conainter.

I am running a container with Debian-9.0-standard_9.7-1_amd64 image and docker.
(For the setup of docker I followed the official setup docker on debian tutorial). I also enabled keyctl and Nesting...

I started following the kubernetes setup tutorial but got stuck when I wanted to configure the network (Flannel) and intialize kubernetes:
kubernetes.PNG

Hopefully somebody has experience and can help me continue (I am already trying for a couple of days :()...

Also I will write a tutorial afterwards (to give back to the community), because I find the documentation about this topic to spread out... (So your contributions will be mentioned of course...)
 
People have already discovered the issue you are seeing with net.bridge not existing in LXC containers, it seems they were trying to achieve the same thing as you [0]. As far as I can tell, the patch mentioned in the linked issues has not been upstreamed into the kernel as of right now, so you will not get it to work unless you're willing to apply the patch yourself.

[0]: https://github.com/lxc/lxd/issues/5193
 
  • Like
Reactions: KevinGoos
People have already discovered the issue you are seeing with net.bridge not existing in LXC containers, it seems they were trying to achieve the same thing as you [0]. As far as I can tell, the patch mentioned in the linked issues has not been upstreamed into the kernel as of right now, so you will not get it to work unless you're willing to apply the patch yourself.

So what you are saying is that unless I do this patch I will never fix this problem? And that I better run it in VM's anyway?
 
Pretty much. Keep in mind this only applies for the first problem you're seeing. The others should be fixable though: Use overlay instead of vfs as graph driver, disable swap (on the host), and for the modprobe error I'd suggest installing kernel header files - although that one might pose different problems as well.