DevOps tool of the month is a new series, where each month I will introduce one new useful DevOps tool in 2021 🙌🏼
The second one in the series is: Loft 🎉 - With loft, any Kubernetes cluster becomes a self-service platform for developers to create virtual clusters on-demand!
Let's say in your company there are 10 project teams all using Kubernetes and each team would need 3 clusters for dev, staging and production environment.
As you might think, each team creating and managing their own K8s cluster is very inefficient. Especially because administration of a K8s cluster is a lot of effort and you don't want to do it 30 times in a company because you have 10 projects. In addition, it's also expensive, because you need more servers and so more resources. 🤯
So a common approach of companies is to create a company-wide K8s cluster that a dedicated team is managing. So now your company would only need to administer this one shared cluster. And they can now give developers access to this shared cluster using isolation with namespaces, so each team can deploy their applications. 👍
However, this comes with the following challenges:
- Give Access - How do you give different teams and individual developers access to this shared cluster?
- Restrict Access - Also, how do you make sure each team only gets access to their project resources? You need to restrict access to each project to keep the cluster secure. Or even within the team, you may want to restrict who has access to what based on their role and tasks.
- Restrict Resources - How do you restrict how much cluster resources each team can use? You don't want one team using up most of the cluster resources or one developer misconfiguring something in his namespace and messing up all other cluster services.
- Isolate Running Resources - How do you isolate the resources and applications of each project from each other? Because obviously, you don't want the project resources to be accidentally mixed up, right?
And Loft helps solve exactly those challenges using a concept of virtual clusters.
So what is a virtual cluster?
It's simply a cluster inside a cluster.
The way Loft implements virtual clusters is, when user creates a vCluster, Loft will create a new namespace and create a lightweight K8s cluster inside that namespace (K3s with Api server and controller). And this way vClusters will be completely isolated from each other, even though they are part of the same host cluster. 😎
Now one developer can create a vCluster to test a new feature for example. And even if he blows up and messes up his vCluster, nothing else gets affected. ✅
Or if a product manager wants to demo new features to the potential app users, they can now very easily spin up a vCluster to deploy the application and remove their vCluster when the demo is over! ✅
A very important feature of Loft is the Sleep Mode, which lets you save significantly on your infrastructure costs.
In Sleep Mode, the virtual cluster will scale down all the resources, however, data and all Kubernetes components will be persisted.
You can trigger the sleep mode either manually or configure virtual clusters to go to sleep mode automatically after some period of time. With the first interaction with that virtual cluster, the cluster will become active again automatically. 👍
Usually you already have existing Kubernetes clusters in your company (created using EKS, OpenShift, Rancher etc) and you already have cluster-wide resources, like Ingress Controller or Monitoring configured.
1. Download Loft CLI
2. Install Loft in one of the clusters
3. Connect clusters to it
Now Loft comes into the picture. Usually DevOps engineers will install Loft in one of the clusters and start connecting all other clusters to it, creating 1 big self-service cluster from many.
4. Cluster admins create users with permissions
Now using loft UI, loft CLI or even kubectl, cluster admins can create users for the teams or individual developers and give them permissions to create and use virtual clusters.
5. Developers can create vClusters when needed
As you see loft solves quite a lot of challenges for managing and using Kubernetes clusters within your company. And at the same time, loft's sleep mode and cluster sharing help you to save cloud computing cost.
So check it out and let me know what you think about it! 🤓 🧐
More awesome tools coming up next on this series, so stay tuned for it! 🎬 😊
Like, share and follow me 😍 for more content: