The Ops Community

Harkirat Singh
Harkirat Singh

Posted on • Updated on

What is Multitenancy ?

Table of Content-

What is Multitenancy ?

Multi Tenant Kubernetes means that the same cluster & control plane are shared by multiple users .
Multi Tenancy
Kubernetes multi-tenancy is the ability to run works-load belonging to different entities , in such a way that each entity workloads are segregated from the others.

In short - Providing isolation between tenants within a cluster .

What is tenants ?
Suppose tenant as a user or application that you want to keep isolated from other user or application in a cluster .

Why within a intra-cluster Multitenancy ?

In inter-cluster multi-tenancy or cluster/tenant, we get isolation for free, but there are too many cons to deal with:

  • Need tools to manage 100s/1000s clusters.
  • There is resource efficiency issue that you have to pay control plane cost per tenant , control plane consume more resources
  • Need to create a cluster for each new tenant.

So we can say cluster/tenant is not practical so we had to go with intra cluster multitenancy .

Types of Multitenancy

  • Soft multitenancy It involves separating a kubernetes cluster among several users , without strict isolation We can achieve it using Kubernetes namespaces , where each namespace represent a tenant.
  • Hard multitenancy It enforces stricter tenant isolation , preventing any negative impact from another tenant .

Implementing hard Multitenancy in Kubernetes requires a more complex namespace or vCluster(virtual cluster) configuration

Single tenancy Vs Multitenancy

Diff

Single Tenancy Multi Tenancy
A Single instance of the software & supporting infrastructural serve a single customer Single instance of the software & its supporting infrastructural serve multiple customer
User has his/her Own Databases & instance of the software User has Shared software application & also the database
More Cost per single user Affordable Cost as share database
Security is easy to achieve You can use Kubernetes Security features such RBAC i.e. Role Based access control to ensure tenants has only access to specific resources
Kubernetes deployment is complex & time consuming With Multitenancy there is less overhead & less complex because you can set up one k8's Cluster for several Tenants
More tasks & regular maintenance "Hand-free" Maintenance as server belongs to the SaaS Vendor

Wanted To Learn More
1)Single Tenant Vs Multi Tenant
2)Understanding k8's Multi Tenant

Discussion (0)