k3s clusters

Turn your connected servers into a Kubernetes cluster running k3s. VPS Manager installs it, joins the nodes, and gives your team kubectl access through the vpsm CLI.

Create a cluster

  1. Open Clusters.
  2. Enter a Name and pick a k3s version.
  3. For each server, choose a role: Server (control plane), Agent (workloads) or Not in cluster.
  4. Optionally tick High availability (3 or 5 server nodes, embedded etcd).
  5. Optionally disable built-ins you don't want: Traefik, ServiceLB, metrics-server, local-storage.
  6. Click Create cluster.

Without high availability you need exactly one server node. With high availability you need an odd number of server nodes, three or more, so etcd keeps a quorum when one fails.

Manage the cluster

The cluster page lets you:

  • Add or remove nodes.
  • Upgrade Kubernetes, one minor version at a time. Downgrades aren't possible.
  • Networking: turn the Traefik ingress controller and the ServiceLB load balancer on or off. Click Save, then Apply; k3s restarts on each server node in turn.
  • Add-ons: install, update or remove cert-manager, Longhorn (storage), CloudNativePG (PostgreSQL operator) and the Zot registry.

Snapshots

High-availability clusters can back up etcd to one of your backup destinations. Under Cluster Snapshots, pick a destination and how many to Keep Last (default 7), tick the daily snapshot (between 03:00 and 04:00 UTC) and click Save Settings. Snapshot Now takes one immediately. Single-server clusters have no etcd to snapshot.

Restoring a snapshot is a manual procedure; the How to Restore section on the page explains the steps.

Deploy an app to the cluster

In the project's Deploy Target card, choose Cluster, pick the cluster under Choose a cluster, and click Save Deploy Target. The next deployment goes to the cluster.

Use kubectl

vpsm kube connect prod

This writes a kubeconfig for the cluster and opens a secure tunnel to its API server, without opening any port on your servers. See the vpsm CLI. Members with permission to manage clusters get admin access in Kubernetes; members who can only view clusters get read-only access.