sealerio / sealer

Build, Share and Run Both Your Kubernetes Cluster and Distributed Applications (Project under CNCF)
http://sealer.cool
Apache License 2.0
2.04k stars 355 forks source link

[Proposal] Integrate with vcluster https://www.vcluster.com/ #1545

Open gyliu513 opened 2 years ago

gyliu513 commented 2 years ago

Issue Description

Type: feature request

Describe what feature you want

Additional context

Add any other context or screenshots about the feature request here.

allencloud commented 2 years ago

Thanks for your feature request @gyliu513 I have to say this is quite farsighted. Now sealer's architecture is still evolving and not so stable. In our roadmap https://github.com/sealerio/sealer/blob/main/ROADMAP.md we aim at separating distributed application and k8s infra and basic infra explicitly. I think the vcluster part could be located in k8s infra layer to enhance virtual multi-tenancy ability.

@starComingup @justadogistaken When we re-arch the underlying architecture, we could take k8s infra scalability into consideration.

starComingup commented 2 years ago

Thanks for your feature request @gyliu513 . And after I view the vcluster introduce. It may just dependent a bin file like vcluster? In my opinion, you may just focus on how to build cloudImage.

FROM kubernetes:v1.19.8
COPY vcluster /bin
COPY helm /bin

vluster look like rely on helm but I'm not for sure, but install helm can help you deploy chart smoothly! After build kubefile and run cluster successful, you can enjoy vcluster command in your master node.

Also you can expand any chart or imageList as you need it in Kubefile, read http://sealer.cool/docs/getting-started/build-cloudimage.html#build-instruction may help you write kubefile. And read http://sealer.cool/docs/reference/cloudrootfs.html#how-can-i-get-cloudrootfs may help understand the principle of Sealer rootfs.

I'd like to know if this method would help you a little. I have been validated this method in ubuntu 20.04.1 LTS.

gyliu513 commented 2 years ago

@allencloud @starComingup thanks for the update.

Here I was hoping I can use sealer create or sealer apply to create a vcluster with specified apps, is it possible to add some options in sealer create like -v vcluster, and this wil create a new vcluster.

I mainly want to use the feature of ClusterImage to create a vcluster on existing host cluster.

justadogistaken commented 2 years ago

@starComingup I think the feature from @gyliu513 is different with the way you create a new vcluster. What you suggest to do is packaging vcluster into image, it may fail to deal with scalability for the whole cluster. Maybe we need to learn more about vcluster, and consider the way of integrating vcluster. Making it a image may not be the best approach. (I'm getting to know the background)

gyliu513 commented 2 years ago

@justadogistaken yes, I was hoping sealer create, sealer apply can create both physical cluster and virtual cluster based on some config parameters.

gyliu513 commented 2 years ago

we aim at separating distributed application and k8s infra and basic infra explicitly.

@allencloud , this is great feature, any timeline for those features?

gyliu513 commented 2 years ago
image
justadogistaken commented 2 years ago

@gyliu513 It's great for expanding usage scenarios for sealer. But the sealer community is going to re-design the architecture, and it's a long-term job. So integrate with vcluster may not be the high-priority task to work on. And thanks for inputting such usage case to us. We will let you know when we start to deal with this feature. And we will keep such demand in mind while we re-design the architecture.