# cloud-init's network-config schema (distinct from the #cloud-config # user-data schema in server.yaml.tpl/agent.yaml.tpl — no "#cloud-config" # header here, and `version: 2` picks the netplan-style dialect). eth0 is # the interface name libvirt's virtio NIC presents as inside a fresh # Ubuntu cloud image — the only interface that exists at boot, since each # node has exactly one network_interface in main.tf's libvirt_domain. # `nameservers` points at the gateway rather than a public resolver # because that's also where libvirt's own DNS forwarder listens (the `dns # { enabled = true }` block on libvirt_network.k3s in main.tf) — it # resolves both k3s.local addresses and forwards everything else out. version: 2 ethernets: eth0: addresses: - ${ip}/${prefix_length} gateway4: ${gateway} nameservers: addresses: [${gateway}]