I have a Harvester cluster. I want to create 3 VMs. The VMs will be part of a Kubernetes cluster. For this, the VMs need constant IPs, which causes issues with the mgmt cluster network which insists on giving a new IP to VMs on restart.
Currently, I do the following:
- Set node specs
- Choose VM image (openSUSE)
- Set network options (use bridge, not masquerade)
- Add cloud config for static IP.
However, when the VM is created, it is still assigned an IP by harvester.
Cloud Config:
network:
version: 1
config:
- type: physical
name: eth0
subnets:
- type: static
address: 192.168.23.14/27
gateway: 192.168.23.1
dns_nameservers:
- 8.8.8.8
Harvester will nonetheless provide another IP address to the VM, and the VM will not be accessible on either of the 2 IPs.
If it’s relevant, I installed the harvester-vm-dhcp-controller
addon for allocating IPs in my LAN to VMs in Harvester. However, the issue persists whether the addon is enabled or not.
I have also created VM networks, both DHCP and manual, but there is no change.