Virtual clusters unlock Kubernetes efficiency and enhance DevEx
In the rapidly evolving landscape of cloud-native technologies, platform engineering teams are increasingly tasked with managing complexity and enabling efficiency at scale. Kubernetes has become a key driver of platform engineering initiatives for its power to accelerate innovation and deliver both scalability and operational stability. For platform teams supporting multiple applications and multiple groups on Kubernetes, virtual Kubernetes clusters are the key to enabling a production-grade, multi-tenant Kubernetes platform.
However, the widespread adoption of Kubernetes has revealed a serious lack of resources that empower platform teams to leverage Kubernetes to its full potential, given its complexity and steep learning curve. Platform teams also face increasing operational complexity, decreased operating efficiency, and spiraling costs. A recent CNCF survey found that overprovisioned Kubernetes was the leading culprit behind the surge in cloud spend for 70% of organizations.
Virtual clusters are a revolutionary solution that enables platform teams to build quickly and securely on Kubernetes, increasing efficiency and decreasing costs while remaining fully customizable and compliant. As part of a comprehensive Kubernetes management platform, virtual clusters allow platform engineers to build, scale, and manage applications with agility and precision. A virtual cluster is a fully functional Kubernetes cluster that runs inside a namespace of another cluster, providing a strong isolation for tenants on top of a shared Kubernetes cluster.
Virtual clusters can be used to partition a single physical cluster into multiple logical, virtual clusters; this process allows for leveraging the benefits of Kubernetes itself, such as optimal resource distribution and workload management. For teams needing to support multiple teams or applications on a shared Kubernetes infrastructure, virtual clusters are the key to allowing platform engineers to create a production-grade multi-tenant Kubernetes platform that is fully customizable and compliant. Teams can provision entire clusters as needed and spin up lightweight virtual clusters with minimal management overhead — reducing costs.
This blog will explore how virtual clusters boost platform engineers’ productivity, streamline workflows, and democratize access to Kubernetes resources without sacrificing security or control. With this approach, organizations can elevate developer experience (DevEx) and unlock innovation by deploying a production-grade multi-tenant platform that is secure, efficient, and user-friendly.
Understanding virtual clusters
The Kubernetes overprovisioning problem comes down to a lack of multi-tenancy. While you can give multiple teams separate namespaces on a single cluster, that approach doesn’t provide enough isolation, nor does it give each tenant the autonomy to control and tune the cluster to their needs.
Because clusters can’t be efficiently and securely shared, you end up with a cluster for every developer, every application environment, and for every customer. The result is a lot of small clusters, increasing overhead and management complexity. And each cluster likely has a copy of the same platform stack. This duplication further increases complexity and cost.
Virtual clusters solve these multi-tenancy challenges, allowing Kubernetes clusters to be efficiently shared.
A virtual cluster is a fully functional Kubernetes cluster that runs inside a namespace of another cluster, while providing strong isolation and autonomy for tenants. Virtual clusters can be used to partition a single physical cluster into multiple logical clusters. They leverage the full benefits of the underlying physical cluster, such as optimal resource distribution and workload management.
Tenants own and control everything inside their virtual clusters, while you maintain ownership and management of everything outside the virtual clusters. The platform stack can be shared between tenants, increasing utilization and reducing costs by as much as 40%. However, tenants have the flexibility to install their own platform components as needed, giving them the autonomy and flexibility they want.
To learn more about virtual clusters and how they work, please refer to the documentation.
How virtual clusters increase productivity
Virtual clusters allow platform engineers to build, scale, and manage applications with greater agility and precision, with significant benefits in both pre-production and production. Specific advantages of virtual clusters include:
- Reduced management effort. The number of physical clusters to be managed can be greatly reduced. Many users of virtual clusters go from dozens or hundreds of clusters down to just a handful.
- Reduced cost. The cost savings from the reduction in the number of physical clusters can be significant, especially if all those clusters are running on a public cloud like AWS or Microsoft Azure.
- Greater control. The platform team can impose limits and maintain greater control over virtual clusters versus physical clusters assigned to a team.
- Self-service. Previously a platform engineer must get involved every time a Kubernetes cluster was created (or destroyed), and each cluster had to be configured, managed, upgraded, monitored, and so on. With virtual clusters, users such as developers and test engineers can create and destroy virtual clusters whenever they need them and perform most management tasks themselves. This takes a lot off your plate and greatly enhances developer autonomy without compromising security and compliance.
New service opportunities
Virtual clusters also allow you to offer services you couldn’t before. For example, you can offer a managed Kubernetes service to internal or external customers. Customers have direct access to dedicated virtual clusters. Streamlined node and resource allocation enable unparalleled scalability and industry-leading efficiency. That translates to lower COGS and high margins. If you’re an ISV, you can elevate your software offering with a virtual cluster allocated to each customer.
Streamline CI/CD workflows
The ability to replace physical clusters with virtual clusters has the potential to streamline a variety of workflows while delivering better outcomes. One of the clearest examples is the ability to accelerate CI/CD workflows using ephemeral Kubernetes clusters.
Without virtual clusters, you have to choose between:
- Provisioning a new Kubernetes cluster every time CI/CD runs. Even in the cloud, cluster provisioning can take up to 30 minutes, slowing down the CI/CD process and adding expense.
- Running the CI/CD pipeline on an existing cluster has disadvantages. These include the inability to customize the environment for each build and the risk that the cluster might drift over time and affect results. It’s expensive to keep a cluster running strictly for CI/CD and having it sit idle much of the time.
With virtual clusters, teams can instantly create clean, new virtual Kubernetes clusters for each pull request, enabling fast, isolated testing and PR previews without wait times and the struggles of a shared environment.
Additional workflows
Virtual clusters can accelerate workflows in almost any situation where you previously needed to create a new cluster or leverage a shared cluster. These include:
- AI + ML experimentation. Data scientists often need to replicate experimental environments to rerun an experiment with different parameters or to run multiple experiments in parallel. With physical clusters, slow startup and costs can be prohibitive, while shared clusters can result in engineers waiting for others’ experiments to finish. Because they can be created in seconds and are easily replicated, virtual clusters solve these challenges. Each experiment can run in its own virtual cluster without delay, and many experiments can run in parallel. The underlying physical cluster can autoscale resources when they are needed (with limits) and release those resources when not in use.
- Sales demos, training, and workshops. Virtual clusters are ideal for any situation where you need to provision one or more pre-configured clusters for a short period.
Democratizing resource access for enhanced DevEx
For organizations that want to increase the velocity and quality of software delivery, DevEx is paramount. The self-service capabilities enabled by virtual clusters go a long way in improving DevEx. Many developers make do with minikube clusters running on their laptops as a proxy for a production environment. With virtual clusters, developers can:
- Spin up a virtual cluster any time they need it
- Have separate development clusters for different projects
- Exercise complete control over the virtual cluster environment
- Tailor a virtual cluster for specific needs without outside assistance and without affecting other virtual clusters or the underlying physical cluster
Virtual clusters behave almost identically to physical clusters, so there’s little or nothing for developers to learn to begin using them. CLI commands and common processes like installing helm charts work with no modifications.
Key takeaways: Elevate DevEx and reduce cloud costs
Virtual clusters provide a production-grade, multi-tenant platform that is secure, efficient, and user-friendly. The use of virtual clusters elevates DevEx, increases productivity, and streamlines workflows. Developers and test engineers benefit from self-service access to full-stack Kubernetes clusters with almost complete configuration control. Anyone can create a virtual cluster in a matter of seconds and begin working.
Virtual clusters increase the productivity of platform engineering teams by enabling self-service for developers, reducing Kubernetes sprawl, and providing more fine-grained control over Kubernetes environments. Workflows like CI/CD benefit from having a clean Kubernetes cluster for every pull request.
Organizations that use virtual clusters decrease operational complexity, reduce cloud costs, and gain the ability to offer new services more cost-effectively.
Visit vCluster.com to learn how to reduce your Kubernetes costs with virtual clusters.
This article was sponsored by Loft Labs for PlatformCon 2024