Skip to main content

Deployment Basics

vCluster Kubernetes Distributions

vCluster is able to use different Kubernetes distributions as a virtual cluster backend. By default, vCluster will use vanilla k8s as the virtual Kubernetes cluster.

warning

Changing the kubernetes distribution of vCluster is not supported, once you deployed a virtual cluster.

Vanilla k8s

In order to use vanilla k8s as a backing cluster, create a vCluster with the following command:

vcluster create my-vcluster

Connect to the vCluster and start using it:

kubectl get ns
...

For more configuration options, please take a look at the k8s distro reference

Compatibility matrix showing which host K8s version (left column) is supported by which vCluster K8s distro versions.

v1.29.0v1.28.4v1.27.8v1.26.11
1.29🆗🆗🆗
1.28🆗🆗🆗
1.27🆗🆗🆗
1.26🆗🆗🆗

Legend:

⚠️ : known issue

: recommended

🆗 : likely compatible

k3s

k3s is a highly available, certified Kubernetes distribution designed for production workloads in unattended, resource-constrained, remote locations or inside IoT appliances.

In order to use k3s as backing cluster, create a vCluster with the following command:

vcluster create my-vcluster --set controlPlane.distro.k3s.enabled=true

Start using it:

kubectl get ns
...

For more configuration options, please take a look at the k8s distro reference

Compatibility matrix showing which host K8s version (left column) is supported by which vCluster K3s distro versions.

v1.29.0-k3s1v1.28.5-k3s1v1.27.9-k3s1v1.26.12-k3s1
1.29🆗🆗🆗
1.28🆗🆗🆗
1.27🆗🆗🆗
1.26🆗🆗🆗

Legend:

⚠️ : known issue

: recommended

🆗 : likely compatible

k0s

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. vCluster supports k0s as backing virtual Kubernetes cluster.

In order to use k0s as backing cluster, create a vCluster with the following command:

vcluster create my-vcluster --set controlPlane.distro.k0s.enabled=true

Start using it:

kubectl get ns
...

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.

For more configuration options, please take a look at the k8s distro reference

Compatibility matrix showing which host K8s version (left column) is supported by which vCluster k0s distro versions.

v1.29.1-k0s.0v1.28.2-k0s.0v1.27.6-k0s.0v1.26.9-k0s.0
1.29🆗🆗🆗
1.28🆗🆗🆗
1.27🆗🆗🆗
1.26🆗🆗🆗

Legend:

⚠️ : known issue

: recommended

🆗 : likely compatible

Data Persistence

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.

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

Deploy vCluster

Deploy a vCluster instance called my-vcluster to namespace team-x. The installation instructions use vCluster CLI, but there are other installation options as well.

  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.

    Alternatively, you can download the binary for your platform from the GitHub Releases page and add this binary to your PATH.

    To confirm that vCluster CLI is successfully installed, test via:

    vcluster --version
  2. (Optional) Configure vCluster with vcluster.yaml.

    Create a file called vcluster.yaml with extra configuration for vCluster. Refer to the vcluster.yaml reference docs to explore all configuration options.

  3. Deploy vCluster

    1. Deploy vCluster.

      vcluster create my-vcluster --namespace team-x

      When the installation finishes, you are automatically connected to the virtual cluster and can run kubectl commands within the virtual cluster.