<p>I'm setting up a kubernetes cluster using lxc container while I was configuring master node with kubeadm init it is showing the following error:-</p>

<pre><code>kubeadm init --apiserver-advertise-address=10.102.126.160 --pod-network-cidr=192.168.0.0/16
[init] Using Kubernetes version: v1.13.1
[preflight] Running pre-flight checks
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 4.15.0-43-generic
DOCKER_VERSION: 18.06.1-ce
DOCKER_GRAPH_DRIVER: overlay2
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
error execution phase preflight: [preflight] Some fatal errors occurred:
    [ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
    [ERROR Swap]: running with swap on is not supported. Please disable swap
    [ERROR SystemVerification]: failed to parse kernel config: unable to load kernel module: "configs", output: "modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.15.0-43-generic/modules.dep.bin'\nmodprobe: FATAL: Module configs not found in directory /lib/modules/4.15.0-43-generic\n", err: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
</code></pre>

<p>Can anyone help me out to solve this issue.</p>

T.V.Deekshith
<p>To run kubernetes inside <code>lxc container</code> you need to do some configuration first, like there is no <code>kernel module</code> in lxc container, so you need to use <code>overlay</code> driver for docker. Also, your swap is ON you need to disable it using <code>swapoff -a</code>. There are many of these configuration you need to do before installing kubernetes cluster using kubeadm.</p>

<p>Here is the very nice blog explaining step by step configuration in lxc container:</p>

<p><a href="https://medium.com/@kvapss/run-kubernetes-in-lxc-container-f04aa94b6c9c" rel="nofollow noreferrer">https://medium.com/@kvapss/run-kubernetes-in-lxc-container-f04aa94b6c9c</a></p>
