Kubernetes VM
Kubernetes VM resources represent KubeVirt virtual machines running in a
Kubernetes cluster. The Kubernetes integration backs them up and restores them
through the k8s+vm protocol.
During a backup, Plakar Control Plane asks KubeVirt to snapshot the virtual
machine. KubeVirt snapshots each disk, so no VolumeSnapshotClass needs to be
configured. Plakar Control Plane then reads each disk through a helper pod and
stores the disk contents and the virtual machine manifest in the Kloset store.
During a restore, Plakar Control Plane recreates the PVC of each disk in the namespace of the destination resource, writes the disk contents back through a helper pod, then applies the virtual machine manifest.
The kubeconfig used by the app must grant the permissions required by the operation. Source apps use the VM backup role and destination apps use the VM restore role. When Plakar runs outside the cluster, both also need the port forwarding role.
Inventory Management
Managed inventories can discover KubeVirt virtual machines automatically once the Kubernetes inventory is connected to a cluster with KubeVirt installed. You can instead set up a self-managed inventory and add the virtual machine manually.
Adding a Kubernetes VM as a resource
When using a self-managed inventory, register the resource with Compute as the
class. For the endpoint, use the namespace followed by the virtual machine name,
for example /default/my-vm. See resources documentation for
more information on how to set up resources on a self-managed inventory.
Backup flow
flowchart TD
subgraph K8s["Kubernetes Cluster"]
VM["Virtual Machine"]
Snap["KubeVirt snapshot"]
Helper["Helper pod"]
end
subgraph Plakar["Plakar Control Plane"]
Source["Kubernetes VM
Source app"]
Backup["Backup process
Encrypt & deduplicate"]
end
Store["Kloset Store"]
Source -->|"requests"| Snap
VM --> Snap
Snap --> Helper
Helper -->|"reads disk data"| Source
Source --> Backup
Backup --> Store
Restore flow
flowchart TD
Store["Kloset Store"]
subgraph Plakar["Plakar Control Plane"]
Destination["Kubernetes VM
Destination app"]
Restore["Restore process"]
end
subgraph K8s["Kubernetes Cluster"]
Helper["Helper pod"]
PVC["Restored disk PVCs"]
VM["Restored
Virtual Machine"]
end
Store --> Restore
Destination --> Restore
Restore -->|"writes via"| Helper
Helper --> PVC
PVC --> VM
Shared Configuration
The following settings are available when configuring both source and
destination apps using the k8s+vm protocol.
- Kubeconfig: Upload a kube config YAML file or paste its contents directly. Leave it empty when Plakar Control Plane runs inside the cluster to use the in-cluster configuration. The kubeconfig can also be loaded from a secret provider.
- Kubelet Image: The container image used for the helper pod. Defaults to a recent kubelet image. Set it to pull the image from another registry, for example a local mirror in an air-gapped cluster.