I am running several LXC containers on Oracle Linux (host) and running EBS application inside those containers.
Now I have more than 10 containers on every 5 hosts.
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.
But Kubernetes works with LXD for lxc containers.
Is there any way through which I can manage lxc container directly with Kubernetes?
Any help will be really appreciated !!
Thanks !!
I believe you can install LXD and it should see all your lxc containers (as it and extension). If not, there should be easy way to migrate lxc containers to lxd. Afterword, you can use that LXE extension for kubernates.
Do you use LXD or classic LXC ?
I am using classic LXC package which is coming oracle Linux Base repo.
Well, official LXE project description doesn't leave any doubts about it. It clearly states that LXD must be installed:
Requirements
You need to have LXD >= 3.3 installed, which packages are officially only available via snap. A LXD built by source is also supported.
So it means you cannot use classic LXC.
As you may know LXC and LXD are two different products although the second one is built on top of the first one as you can read here but the most important difference is that LXD exposes a REST API:
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).
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.
This is actually its key feature which makes possible it's management with additional tools like LXE.
So again: The answer to your question is: No, you can't use classic LXC. It must be LXD. And as far as I know there is no other way available to manage LXC containers directly with kubernetes.