Kubernetes management is hard and getting more complex day-by-day, Virtual clusters or vClusters have emerged as a game-changing solution for organizations looking to optimize their deployments. Today, we’re excited to walk you through setting up and using vClusters with Taikun CloudWorks, a hands-on demo on how this powerful combination can revolutionize your Kubernetes strategy.
Why vClusters?
Before we dive into the hands-on portion, let’s quickly recap why vClusters are gaining traction:
- Isolation: vClusters provide better workload isolation than namespaces.
- Cost Efficiency: Share underlying infrastructure while maintaining logical separation.
- Rapid Provisioning: Create new environments in seconds, perfect for CI/CD pipelines.
- Multi-Tenancy: Enable multiple teams to work independently within the same physical cluster.
CloudWorks and vCluster Capabilities
vCluster support in CloudWorks is provided by the vCluster open source project. CloudWorks brings together a set of platform capabilities that build on the base functionality and value of vClusters.
Feature | vCluster | vCluster with CloudWorks |
---|---|---|
Management | ||
Limits | 5 vClusters, 2 Host Clusters, 50 Users | No Limits |
Terraform Integration | Yes | Single Provider for all supported platforms/ Cloud Providers |
CRDs | Yes | Yes |
Cluster API Integration | Yes | Yes |
Monitoring | Install required | Prometheus pre-configured on the host cluster to monitor virtual control plane |
Backup | Install required | Velero pre-installed on host cluster |
Alerts | E-mail, Slack and WebHooks | |
White Labelling | Yes | |
Networking | ||
CoreDNS | Pre-configured | |
Ingress | Yes | Yes plus Taikun Ingress to expose services without the need for a Load Balancer for dev/test |
Backing Store | ||
SQLite | Yes | Yes |
Self-Managed etcd | Yes | |
Application Lifecycle | ||
Application Delivery | Pre-integrated and integrates with existing CI/CD tooling | |
Repositories | Curated set of applications plus bring your own | |
Catalogues | Create project specific allocation catalogs | |
Kubeconfig | ||
Management | Via command line | Create and manage via Console and access vCluster via console terminal |
Self-Service | ||
Projects | Organise vClusters and Users | Manage Clusters, resources, applications and users. Can be host or vClusters |
Quotas | Limit CPU, RAM and Storage for each project. | |
Expiration | Control the lifetime of projects | |
Access | ||
RBAC | Yes | Yes |
User Access | Yes | Yes |
SSO | Yes, via Keycloak | |
Audit | Events are logged, searchable and downloadable | |
Deployment | ||
Multi-Region | Global Control Plane | |
Edge | With infrastructure partners | |
Air-Gapped | Self-hosted install for private or disconnected environments | |
Support | ||
Yes | Yes | |
Slack | Private Shared Channel | |
24/7 Support | Included |
Setting Up vClusters in Taikun CloudWorks
Let’s walk through the process of creating and managing a vCluster in CloudWorks.
For example: Let’s explore how Sarah, a DevOps lead, leverages virtual Kubernetes clusters to optimize resource utilization and reduce costs. Sarah is facing inefficiencies due to idle workloads and excessive Kubernetes clusters. vClusters offer a solution by running isolated clusters within a single physical Kubernetes cluster. Each vCluster has its own API server, providing better isolation than namespaces and more cost-effectiveness than separate clusters.
Let’s see how Sarah can implement vCluster in Taikun CloudWorks:
- She logs into Taikun CloudWorks and selects her host Kubernetes cluster.
- In the ‘Virtual Clusters’ tab, she creates a new vCluster named ‘marketing-ai-vcluster’.
- Sarah configures resource limits and selects the Kubernetes version.
- Behind the scenes, Taikun CloudWorks uses vCluster to create a lightweight virtual control plane within the host cluster.
- This vCluster runs its own API server, scheduler, and controller manager, isolated from the host cluster’s control plane.
Let’s go hands-on !! 🚀
Glimpse of basic Taikun CloudWorks and vCluster Architecture
Step 1: Log into Taikun CloudWorks
First, access your CloudWorks platform and log in with your credentials.
Step 2: Create a Host Cluster
Before we can create a vCluster, we need a host cluster:
- Navigate to the “Projects” section in the left sidebar.
- Click “Add Project” and fill in the details:
- Name: “marketing-ai-demo” and choose your preferred cloud provider
- Set appropriate quotas for CPU, RAM, and storage
- Click “Create Project” to provision your host cluster.
- Adding Kubernetes cluster servers:
- Master node: You just need to type initials and taikun cloudworks pre-fill the data for you, Very cool indeed.
- Worker node: I’m creating one for this demo but you can create as much as you need according to your use-case.
- Bastion server: It allows access to a private network from an external network.
- Once done! Click on the green commit button to create a cluster.
Step 3: Create a Virtual Cluster
Once your host cluster is ready, there are two ways you can create a virtual cluster on Taikun Cloudworks!
Method 1
- You can directly click on the drop-down arrow beside Add project in projects to create a new virtual cluster.
Method 2
- In the Projects list, find your “marketing-ai-demo” project.
- Click on the project to open its details.
- Navigate to the “Virtual Clusters” tab.
- Click “Add Virtual Cluster” and provide the following:
- Name: “ai-marketing-test-vc“
- Alerting Profile: We can inherit this from the parent cluster(i.e. host Kubernetes cluster)
- Expiration: With CloudWorks, we can also set an expiration time for a cluster, and you can automatically delete it when it expires.
- Click “Create” to provision your vCluster.
🎉 vCluster will be up and running in 1 or 2 mins !!
Step 4: Access Your Virtual Cluster
After your vCluster is created:
- In the Projects list, you’ll see a new project with the Cloud Type “ai-marketing-test-vc“.
- Click on this project to access your vCluster’s details.
- In the “Overview” tab, find the “Kubeconfig” section.
- Click “Add Kubeconfig” to access your vCluster.
- Once created, you can access this kubeconfig from the terminal directly, or you can download it for later.
Step 5: Deploy an Application to Your vCluster
Let’s deploy a simple application to test our vCluster:
- Open your terminal and set the KUBECONFIG environment variable to the path of the downloaded kubeconfig file:
export KUBECONFIG=/path/to/your/kubeconfig
- Create a deployment:
kubectl create deployment nginx --image=nginx
- Expose the deployment:
kubectl expose deployment nginx --port=80 --type=ClusterIP
- Verify the deployment:
kubectl get pods,svc
Expected Output:
Taikun Terraform Provider
You can also levarage our terraform provider to create this setup in a click from your favorite IDE or terminal/CLI. Check out this example terraform script for more.
Leveraging CloudWorks Features with vClusters
Taikun CloudWorks enhances the vCluster experience with several built-in features:
- Monitoring: CloudWorks pre-configures Prometheus on the host cluster to monitor your virtual control plane.
- Backup: Velero comes pre-installed on the host cluster for easy backups.
- Networking: CoreDNS is pre-configured, and you can use Taikun Ingress to expose services without needing a Load Balancer for dev/test environments.
- Access Management: Utilize CloudWorks’s robust RBAC and SSO capabilities to manage access to your vClusters.
Conclusion
Virtual clusters in Taikun CloudWorks offer a powerful solution for organizations looking to optimize their Kubernetes deployments. By combining the isolation and flexibility of vClusters with CloudWorks’s comprehensive management features, you can significantly improve your development workflows, reduce costs, and enhance multi-tenancy support.
We’ve only scratched the surface of what’s possible with vClusters in CloudWorks. As you continue to explore, you’ll discover how this combination can transform your Kubernetes strategy, enabling more efficient resource utilization, faster development cycles, and improved team autonomy.
Ready to take your Kubernetes management to the next level? Log into Taikun CloudWorks today and start exploring the power of virtual clusters!
Taikun CloudWorks is a one-stop solution for your Kubernetes workloads. Try Taikun CloudWorks today. Book your free demo today, and let our team simplify, enhance, and streamline your infrastructure management.