Skip to main content

Deployment Basics

There are multiple ways to deploy and manage your vCluster. Review the different choices and choose the one that suits your needs.

Pre-Deployment Configuration Options

Before deploying, it's recommended to review the set of configuration options that cannot be updated post deployment. These options require deploying a brand new vCluster instead of upgrading your vCluster with new options.

Topologies

  • High Availability - Run multiple copies of vCluster components.
  • Isolated Workloads - Different options to isolate a workload in a vCluster.
  • Isolated Control Plane - Run vCluster control plane in a host cluster different from the host cluster running workloads.
  • Multi-Namespace Mode - Run the workloads on the host cluster in a different namespace from the namespace running the vCluster pod.
  • Rootless Mode - Deploy the vCluster pod without root access to the host cluster.

Other Options

Backing Store Options

vCluster allows you to use either etcd or a relational database via KINE as a backend. This feature provides flexibility to vCluster operators. The available datastore options allow you to select a datastore that best fits your use case.

vCluster supports the following datastore options:

warning

Changing the backing store of vCluster is not supported once deployed except for migrating from SQLite to embedded etcd.

Configuration Options

This is the default, so you don't need to configure anything. If you want to explicitly set this option, you can use:

controlPlane:
backingStore:
database:
embedded:
enabled: true
vCluster Kubernetes Distribution Options

vCluster is able to use different Kubernetes distributions as a virtual cluster distribution.

warning

After deploying your vCluster, changing the Kubernetes distribution of vCluster is not supported.

By default, the distribution of vCluster is vanilla Kubernetes and is the recommended distribution to use.

There are 2 other options of distributions for vCluster.

  • k3s is a highly available, certified Kubernetes distribution designed for production workloads in unattended, resource-constrained, remote locations or inside IoT appliances.
  • k0s is an all-inclusive Kubernetes distribution, which is configured with all of the features needed to build a Kubernetes cluster and packaged as a single binary for ease of use. Please note that dual stack networking is not supported with k0s, you will be able to deploy it on a dual stack host cluster, but it will not have all the dual stack features.

Pre-requisites

You need the following:

  • Access to a Kubernetes v1.26+ cluster with permissions to deploy applications into a namespace. This is the host cluster for vCluster deployment.
  • kubectl
  • Helm v3.10.0+

Deploy vCluster

All of the deployment options deploy a vCluster called my-vcluster into a namespace team-x using the vCluster Helm chart. Each example expects a vcluster.yaml, which is an optional configuration file. Refer to the vcluster.yaml reference docs to explore all configuration options.

Since the vCluster v0.20 release is in beta, you need to specify the vCluster version as Helm doesn't deploy pre-releases automatically.

vcluster.yaml is optional

The vcluster.yaml is optional, so feel free to update the example and remove the file.

  1. Install the vCluster CLI.

    brew install loft-sh/tap/vcluster-experimental

    If you installed the CLI using brew install vcluster, you should brew uninstall vcluster and then install the experimental version. The binaries in the tap are signed using the Sigstore framework for enhanced security.

    Confirm that you've installed the correct version of the vCluster CLI.

    vcluster --version
  2. Deploy vCluster.

    vcluster create my-vcluster --namespace team-x --values vcluster.yaml

    When the installation finishes, you are automatically connected to the virtual cluster. You Kubernetes context is updated to point to your new virtual cluster. You can run local kubectl commands for the new virtual cluster.

Deploy vCluster with the vCluster Platform

Virtual clusters can be deployed as standalone virtual clusters on host clusters as described above, but there is also a vCluster Platform that is a UI to manage your virtual clusters, host clusters and other resources. There are many features that are included as part of the vCluster Platform besides having a central management platform for virtual clusters.

If you already have a vCluster Platform, read more about how to deploy virtual clusters in the Platform.