kubernetes-retired / multi-tenancy

A working place for multi-tenancy related proposals and prototypes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[virtualcluster] How to handle shared instance with VC

gyliu513 opened this issue · comments

With VC, all of the components installed in tenant cluster will be isolated, and the tenant cluster will have all resources for a specified application.

Here the question is there are some apps, which has a shared component, and the component will be shared by many apps. So with such apps, I was hoping I can install the shared component in the super cluster, but install other components for the app into tenant clusters, and I want all of the tenant cluster app can access the super cluster shared component, any comments for how can I achieve this?

I think with this model, I can also reduce the footprint for the supercluster as well, as I can abstract some common services and deploy them into the super cluster, and share it with all tenant clusters.

Maybe we can take this question over to https://sigs.k8s.io/cluster-api-provider-nested.

Short answer is we do a bit of this, but it's slightly different we allow nested(virtual) clusters to operate on "real" super cluster Service clusterIPs so that we can have routable clusterIP ranges, this is done via a mutating admission webhook which acts as a proxy to the super cluster, we also have custom syncers written using this model - https://github.com/kubernetes-sigs/cluster-api-provider-nested/blob/main/virtualcluster/doc/customresource-syncer.md for CRDs that we expose only the implementation at the super cluster but want tenant clusters to be able to CRUD them.