Migrate from K3s to Kubernetes
Starting in vCluster 0.25.0, you can migrate virtual clusters from the K3s distribution to the standard Kubernetes (K8s) distribution. This migration gives you access to the full Kubernetes feature set while preserving your existing workloads and configuration.
vCluster v0.33 removes support for the K3s distribution entirely. If your virtual clusters currently use K3s, migrate them to K8s on your current vCluster version before upgrading to v0.33.
Prerequisitesβ
-
Administrator access to a Kubernetes cluster: See Accessing Clusters with kubectl for more information. Run the command
kubectl auth can-i create clusterrole -Ato verify that your current kube-context has administrative privileges.infoTo obtain a kube-context with admin access, ensure you have the necessary credentials and permissions for your Kubernetes cluster. This typically involves using
kubectl configcommands or authenticating through your cloud provider's CLI tools. -
helm: Helm v3.10 is required for deploying the platform. Refer to the Helm Installation Guide if you need to install it. -
kubectl: Kubernetes command-line tool for interacting with the cluster. See Install and Set Up kubectl for installation instructions.
Additionally, you need:
vClusterCLI version 0.25.0 or higher- An existing virtual cluster using K3s distro
Migration processβ
The migration is triggered automatically when changing the distribution from K3s to Kubernetes (K8s) during an upgrade.
During migration process vCluster performs these actions:
- Detects that you are switching from K3s to K8s
- Copies all relevant certificates and configuration from K3s paths to K8s paths
- Preserves database content (for both SQLite and embedded etcd backing stores)
- Adds an annotation to prevent accidental re-migration
- Launches the new control plane with K8s distro
All your existing workloads, services, and resources remain available after migration without interruption.
The automated migration process only supports moving from the K3s distro to the K8s distro. Migration between other distro types is not supported. This is a one-way processβmigrating back from the K8s distro to K3s is not possible.
Migrate a virtual clusterβ
Use a vcluster.yaml fileβ
If you're managing your virtual cluster with a vcluster.yaml file, modify it to use K8s distro:
Original configuration:
controlPlane:
distro:
k3s:
enabled: true
New configuration:
controlPlane:
distro:
k8s:
enabled: true
Then apply the changes:
vcluster create my-vcluster --values vcluster.yaml --upgrade
- Migration is one-way: you cannot migrate back from K8s to K3s
- The K3s-specific resources and directories are preserved after migration for safety
- Migration supports all backing stores. For external databases (such as PostgreSQL or MySQL), certificates are rotated and the control plane pod restarts during migration
- High-availability configurations are fully supported
After migrationβ
After a successful migration, the control plane pod uses the Kubernetes distro instead of K3s. You can verify this by checking the container image of the control plane pod, which now shows a Kubernetes image.
Troubleshoot migration issuesβ
If you encounter issues during migration, check the control plane pod logs for error messages:
kubectl logs -n <namespace> <vcluster-control-plane-pod>
Look for log entries that include "Migrating K3s distro certificates to K8s" to trace the migration process.