<p>I am running several LXC containers on Oracle Linux (host) and running EBS application inside those containers.<br />
Now I have more than 10 containers on every 5 hosts.<br />
I am looking for a solution for managing these containers. The research told me that Kubernetes is a solution for managing containers and perform several other activities with it like autoscaling ..etc.<br />
But Kubernetes works with LXD for lxc containers.<br />
Is there any way through which I can manage lxc container directly with Kubernetes?<br />
Any help will be really appreciated !!</p>
<p>Thanks !!</p>

<blockquote>
<p>Do you use LXD or classic LXC ?</p>
<p>I am using classic LXC package which is coming oracle Linux Base repo.</p>
</blockquote>
<p>Well, official <a href="https://github.com/automaticserver/lxe#lxe" rel="nofollow noreferrer">LXE project description</a> doesn't leave any doubts about it. It clearly states that <a href="https://github.com/automaticserver/lxe#requirements" rel="nofollow noreferrer">LXD must be installed</a>:</p>
<blockquote>
<h2>Requirements</h2>
<p>You need to have LXD &gt;= 3.3 installed, which packages are officially
only available  <a href="https://linuxcontainers.org/lxd/getting-started-cli/#snap-package-archlinux-debian-fedora-opensuse-and-ubuntu" rel="nofollow noreferrer">via
snap</a>.
A LXD built by source is also supported.</p>
</blockquote>
<p>So it means you cannot use classic LXC.</p>
<p>As you may know <a href="https://linuxcontainers.org/lxc/introduction/" rel="nofollow noreferrer">LXC</a> and <a href="https://linuxcontainers.org/lxd/introduction/" rel="nofollow noreferrer">LXD</a> are two different products although the second one is built on top of the first one as you can read <a href="https://linuxcontainers.org/lxd/introduction/#relationship-with-lxc" rel="nofollow noreferrer">here</a> but the most important difference is that <strong>LXD</strong> exposes a <strong>REST API</strong>:</p>
<blockquote>
<p>The core of LXD is a privileged daemon which exposes a REST API over a
local unix socket as well as over the network (if enabled).</p>
<p>Clients, such as the command line tool provided with LXD itself then
do everything through that REST API. It means that whether you're
talking to your local host or a remote server, everything works the
same way.</p>
</blockquote>
<p>This is actually its key feature which makes possible it's management with additional tools like <strong>LXE</strong>.</p>
<p>So again: <strong>The answer to your question is: No, you can't use classic LXC. It must be LXD.</strong> And as far as I know there is no other way available to manage <strong>LXC</strong> containers directly with <strong>kubernetes</strong>.</p>
