taikun.cloud

Getting Started with Virtual Clusters in Taikun CloudWorks

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:

  1. Isolation: vClusters provide better workload isolation than namespaces.
  2. Cost Efficiency: Share underlying infrastructure while maintaining logical separation.
  3. Rapid Provisioning: Create new environments in seconds, perfect for CI/CD pipelines.
  4. 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.

FeaturevClustervCluster with CloudWorks
Management
Limits5 vClusters, 2 Host Clusters, 50 UsersNo Limits
Terraform IntegrationYesSingle Provider for all supported platforms/ Cloud Providers
CRDsYesYes
Cluster API IntegrationYesYes
MonitoringInstall requiredPrometheus pre-configured on the host cluster to monitor virtual control plane
BackupInstall requiredVelero pre-installed on host cluster
AlertsE-mail, Slack and WebHooks
White LabellingYes
Networking
CoreDNSPre-configured
IngressYesYes plus Taikun Ingress to expose services without the need for a Load Balancer for dev/test
Backing Store
SQLiteYesYes
Self-Managed etcdYes
Application Lifecycle
Application DeliveryPre-integrated and integrates with existing CI/CD tooling
RepositoriesCurated set of applications plus bring your own
CataloguesCreate project specific allocation catalogs
Kubeconfig
ManagementVia command lineCreate and manage via Console and access vCluster via console terminal
Self-Service
ProjectsOrganise vClusters and UsersManage Clusters, resources, applications and users. Can be host or vClusters
QuotasLimit CPU, RAM and Storage for each project.
ExpirationControl the lifetime of projects
Access
RBACYesYes
User AccessYesYes
SSOYes, via Keycloak
AuditEvents are logged, searchable and downloadable
Deployment
Multi-RegionGlobal Control Plane
EdgeWith infrastructure partners
Air-GappedSelf-hosted install for private or disconnected environments
Support
E-MailYesYes
SlackPrivate Shared Channel
24/7 SupportIncluded

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:

  1. She logs into Taikun CloudWorks and selects her host Kubernetes cluster.
  2. In the ‘Virtual Clusters’ tab, she creates a new vCluster named ‘marketing-ai-vcluster’.
  3. Sarah configures resource limits and selects the Kubernetes version.
  4. Behind the scenes, Taikun CloudWorks uses vCluster to create a lightweight virtual control plane within the host cluster.
  5. 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:

  1. Navigate to the “Projects” section in the left sidebar.
  1. 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
  1. Click “Create Project” to provision your host cluster.
  2. 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.
  1. 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

  1. You can directly click on the drop-down arrow beside Add project in projects to create a new virtual cluster.

Method 2

  1. In the Projects list, find your “marketing-ai-demo” project.
  2. Click on the project to open its details.
  3. Navigate to the “Virtual Clusters” tab.
  1. 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.
  1. 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:

  1. In the Projects list, you’ll see a new project with the Cloud Type “ai-marketing-test-vc“.
  2. Click on this project to access your vCluster’s details.
  3. In the “Overview” tab, find the “Kubeconfig” section.
  4. Click “Add Kubeconfig” to access your vCluster.
  1. 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:

  1. Open your terminal and set the KUBECONFIG environment variable to the path of the downloaded kubeconfig file:
Bash
   export KUBECONFIG=/path/to/your/kubeconfig
  1. Create a deployment:
Bash
   kubectl create deployment nginx --image=nginx
  1. Expose the deployment:
Bash
   kubectl expose deployment nginx --port=80 --type=ClusterIP
  1. Verify the deployment:
Bash
   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:

  1. Monitoring: CloudWorks pre-configures Prometheus on the host cluster to monitor your virtual control plane.
  2. Backup: Velero comes pre-installed on the host cluster for easy backups.
  3. Networking: CoreDNS is pre-configured, and you can use Taikun Ingress to expose services without needing a Load Balancer for dev/test environments.
  4. 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.