Reputation: 51
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 !!
Upvotes: 5
Views: 6167
Reputation: 1
https://github.com/charmed-kubernetes/charm-kube-virt
Charmed-kubernetes bootstrap with JUJU.. LXD native cnf certified k8s distribution is great. canonical/ubuntu k8s CDK relies heavily on lxdbr0, You may also no use OVS openvswitch or a native linux bridge as well to manage your cni. for LXD/vm/ and containers.. I have not used it with lxd, lxd virtual machines and containers work great and you can even port some instances of VM's to lxd containers using lxc2pc. With charmed kuberentes and Juju you can integrate a mixed stack with models allowing your kubernetes instances in-infra access to other VM's and containers provided you are on baremetal(for Vm's). Cheers
P.s - https://mist.io/blog/2020-05-20-kubevirt-lxd-ldap-ad-mist-v43
you may want to check out mist.io n Mist v4.3 you can now manage KubeVirt, LXD and G8 alongside public & private clouds, hypervisors, Docker and bare metal servers. namste'
Upvotes: 0
Reputation: 469
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.
Upvotes: 0
Reputation: 11128
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.
Upvotes: 2