Can Kubernetes manage LXC containers without LXD daemon?

ぐ巨炮叔叔 提交于 2021-02-11 02:00:45

问题


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 !!


回答1:


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.



来源:https://stackoverflow.com/questions/63448030/can-kubernetes-manage-lxc-containers-without-lxd-daemon

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!