Drop the now-meaningless kubevirt- prefix and move the hosts out of hosts/k8s/, following the existing 12kingdoms-shoukei layout: the directory and output carry the theme prefix while the configuration, hostname and colmena target are the bare name (shoryu, shushou, youko). - hosts/k8s/kubevirt-* -> hosts/12kingdoms-*; the shared disko config becomes host-disko-fs.nix; the now-different relative imports are fixed - outputs, vars/networking.nix keys, the Justfile recipes/tags, the eval tests and the docs follow - colmena reaches these hosts by IP (a new targetHost override), since their DNS name changes with the hostname and is not resolvable until the router learns it
1.2 KiB
How to create & managage KubeVirt's Virtual Machine from this flake?
[!NOTE] KubeVirt is being retired. aquamarine runs natively on
youkoand the k3s-test nodes run as microVMs; this document only covers the KubeVirt VMs that are left to move (currently the Windows VM).
Use aquamarine as an example, first build and upload the virtual machine's qcow2 image to the file
server:
just upload-vm aquamarine
Then create the virtual machine by creating a yaml file at
ryan4yin/k8s-gitops, set the
spec.dataVolumeTemplates[0].source.http.url to the uploaded file's URL, and fluxcd will
automatically apply the changes, then a virtual machine named aquamarine will be created in the
KubeVirt cluster.
Once the virtual machine aquamarine is created, we can deploy updates to it with the following
commands:
just col aquamarine
just col shoryu
# Set a configuration for the next boot instead of switching immediately
just col aquamarine boot
If you're not familiar with remote deployment, please read this tutorial first: Remote Deployment - NixOS & Flakes Book