Configure Talos nodes for Longhorn storage
Add the Talos extension image and dedicated user volume configuration, point Longhorn at the mounted disk, and document rebuild and rolling-upgrade steps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -31,26 +31,36 @@ Talos 1.14 no longer publishes the release installer image at `ghcr.io/siderolab
|
||||
```bash
|
||||
export TALOSCONFIG="$HOME/.talos/home-services/talosconfig"
|
||||
|
||||
export TALOS_INSTALLER_IMAGE="factory.talos.dev/metal-installer/376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba:v1.14.0"
|
||||
export TALOS_INSTALLER_IMAGE="factory.talos.dev/metal-installer/613e1592b2da41ae5e265e8789429f22e121aab91cb4deb6bc3c0b6262961245:v1.14.0"
|
||||
```
|
||||
|
||||
Upgrade the worker first:
|
||||
This repository's schematic is defined in `terraform/talos-image-schematic.yaml` and includes `siderolabs/iscsi-tools` and `siderolabs/util-linux-tools`, which Longhorn requires. Rebuild the schematic if the Talos version or extension list changes, then update both `talos_installer_image` in Terraform and `TALOS_INSTALLER_IMAGE` here. To regenerate the schematic ID:
|
||||
|
||||
```bash
|
||||
curl -fsS -X POST https://factory.talos.dev/schematics \
|
||||
-H 'Content-Type: application/yaml' \
|
||||
--data-binary @terraform/talos-image-schematic.yaml | jq -r .id
|
||||
```
|
||||
|
||||
For an existing cluster, upgrade one node at a time, worker first:
|
||||
|
||||
```bash
|
||||
talosctl upgrade \
|
||||
--endpoints 10.0.0.246 \
|
||||
--nodes 10.0.0.246 \
|
||||
--image "$TALOS_INSTALLER_IMAGE" \
|
||||
--drain=false \
|
||||
--wait
|
||||
```
|
||||
|
||||
After the worker is healthy, upgrade the control-plane node:
|
||||
Use `--drain=false` for the worker because it is the only schedulable worker and Argo CD has no second worker on which to reschedule. After the worker is healthy, upgrade the single control-plane node without draining:
|
||||
|
||||
```bash
|
||||
talosctl upgrade \
|
||||
--endpoints 10.0.0.99 \
|
||||
--nodes 10.0.0.99 \
|
||||
--image "$TALOS_INSTALLER_IMAGE" \
|
||||
--drain=false \
|
||||
--wait
|
||||
```
|
||||
|
||||
@@ -70,3 +80,25 @@ terraform apply
|
||||
```
|
||||
|
||||
Do not use `talosctl reset` or recreate the VMs for this upgrade. The installer preserves the Talos state and Kubernetes data.
|
||||
|
||||
## Longhorn node prerequisites
|
||||
|
||||
Every node providing Longhorn storage must have the Image Factory extensions above and a dedicated data disk attached as `/dev/vdb`. The current VMs use a 10 GiB disk for Longhorn and a separate `/dev/vda` install disk. Do not select or format `/dev/vda`.
|
||||
|
||||
Talos provisions the extra disk through `terraform/longhorn-user-volume.yaml` as a `UserVolumeConfig`, mounting it at `/var/mnt/longhorn`. After Terraform configures the nodes and before applying the Argo CD ApplicationSets, apply the volume config to each node:
|
||||
|
||||
```bash
|
||||
talosctl patch machineconfig \
|
||||
--endpoints 10.0.0.246 --nodes 10.0.0.246 \
|
||||
--patch @terraform/longhorn-user-volume.yaml
|
||||
talosctl patch machineconfig \
|
||||
--endpoints 10.0.0.99 --nodes 10.0.0.99 \
|
||||
--patch @terraform/longhorn-user-volume.yaml
|
||||
```
|
||||
|
||||
Reboot nodes one at a time, worker first. For an existing cluster, the extension upgrade above also reboots each node and can be performed after applying the volume configuration. Wait for the worker to return Ready before upgrading or rebooting the control-plane node. Verify the Talos volume is available on both nodes before allowing Longhorn to use it. Longhorn's chart sets `defaultDataPath` to `/var/mnt/longhorn`.
|
||||
|
||||
## Cilium Install
|
||||
Cilium is installed using the recommended method via helm using ArgoCD.
|
||||
|
||||
https://docs.siderolabs.com/kubernetes-guides/cni/deploying-cilium#deploy-cilium-cni
|
||||
|
||||
Reference in New Issue
Block a user