Tenant isolation with Kubernetes on networking level

我们两清 提交于 2020-01-01 22:03:52

问题


We want to run a multi-tenant scenario that requires tenant separation on a network level.

The idea is that every tenant receives a dedicated node and a dedicated network that other tenants nodes can join. Tenant nodes should be able to interact with each other in that network.

Networks should not be able to talk with each other (true network isolation).

Are there any architectural patterns to achieve this?

  • One Kubernetes cluster per tenant?
  • One Kubernetes cluster for all tenants, with one subnet per tenant?
  • One Kubernetes cluster across VPCs (speaking in AWS terms)?

回答1:


The regular way to deal with multi-tenancy inside kubernetes is to use namespaces. But this is within a kube cluster, meaning you still have the same underlying networking solution shared by all tenants. That is actualy fine, as you have Network Policies to restrict networking in the cluster.

You can obviously run autonomous clusters per tenant, yet this is not exactly multi-tenancy then, just multiple clusters. Networking can be configured on node level to route as expected, but you'd still be left with an issue of cross-cluster service discovery etc. Federation can help a bit with that, but I would still advise to chase Namespaces+Policies approach.




回答2:


I see four ways to run multi-tenant k8s clusters at network-level:

  1. Namespaces
  2. Ingress rules
  3. allow/deny and ingress/egress Network Policies
  4. Network-aware Zones


来源:https://stackoverflow.com/questions/48755931/tenant-isolation-with-kubernetes-on-networking-level

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