A user has developed an operator to manage VyOS Router VMs from Kubernetes without needing SSH access, utilizing QEMU Guest Agent instead. They are looking for feedback on this approach and its adoption in network automation.
I run VyOS as routers in both KubeVirt (on Harvester) and Proxmox VE. Got tired of SSHing into each VM to push config. Ansible doesn't really help either, it still depends on management network and SSH being reachable, which is exactly the thing your router is supposed to provide. So I wrote an operator that does it through QEMU Guest Agent instead. No SSH, no network access to the router needed. You write VyOS config as CRDs — `VRouterTemplate` holds config snippets with Go templates, `VRouterTarget` points to a VM, and `VRouterBinding` ties them together. The operator renders everything and pushes it via QGA. If the VM reboots or migrates, it detects and re-applies. Two providers so far: - KubeVirt (tested on Harvester HCI v1.7.1) - Proxmox VE (tested on PVE 9.1.6) Built with Kubebuilder. Provider interface is pluggable so adding new hypervisors shouldn't be hard. GitHub: https://github.com/tjjh89017/vrouter-operator Anyone else doing network automation with VMs in K8s? Curious how others handle this. Update with Demo Video in Youtube, hope this can help you to understand more. https://www.youtube.com/watch?v=RsieH9gFU4I