Skip to content
ImagineWorld

Networking for Harvester Clusters and VMs

node_idnode-book_mastering-suse-harvester_chapter-06-networking-for-harvester-clusters-and-vms
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num6
chapter_titleNetworking for Harvester Clusters and VMs
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 6: Networking For Harvester Clusters And VMs

Section titled “Chapter 6: Networking For Harvester Clusters And VMs”

Networking defines whether your Harvester cluster feels boring and reliable or temperamental and fragile. Storage replication, VM traffic, access to the UI, guest Kubernetes clusters, API calls, backups, and monitoring all depend on how you wire the cluster to the rest of your infrastructure. Harvester intentionally keeps networking relatively straightforward. It uses a management network for control plane and node connectivity, a virtual IP to expose the cluster API and UI, and Linux bridges with VLAN tagging to connect VMs to external networks. Multus and additional CNI plugins extend this to multiple networks per VM when you need more complex setups.

To operate Harvester confidently, you need to understand the management network and cluster VIP, how VLAN and untagged networks map to Linux bridges, how multi NIC VMs and Multus work together to expose services, and how to troubleshoot packet flow when something does not behave. This section will walk through these topics in a practical way, with enough detail for you to design and debug real environments instead of guessing when something breaks.

6.1: Management Network, Cluster VIP And Node Connectivity

Section titled “6.1: Management Network, Cluster VIP And Node Connectivity”

The management network is the foundation for everything Harvester does. It is the network that nodes use to talk to each other, to run RKE2 control plane traffic, to replicate Longhorn volumes, and to serve the Harvester UI and API. When you install Harvester, one of the installer steps asks you which interface will be used as the management interface and whether it uses DHCP or static addressing. The combination of that interface and IP configuration defines the node’s place in the management network.

On top of individual node addresses, Harvester uses a virtual IP, often called the cluster VIP, to provide a single stable endpoint for the management interface. When you install the first node in create mode, the installer prompts for a VIP. That VIP becomes the address you use to access the Harvester dashboard and API. Behind the scenes, Harvester runs keepalived on the nodes so that the VIP floats between them based on health. If the node currently holding the VIP fails, another node on the same L2 segment takes over.

This means that all management nodes must be on the same layer 2 network segment for the VIP to work correctly. The VIP is not a routed anycast address, it is a typical VRRP style virtual address. If you spread your control plane nodes across multiple VLANs or layer 2 domains, you will have to do special work at the network layer to keep the VIP reachable, which most teams prefer to avoid. In practice, you pick one management VLAN or untagged subnet, place all Harvester nodes’ management interfaces in that segment, and assign the VIP inside that subnet.

If you choose static addressing, your Harvester configuration file or installer entries will look roughly like this at a conceptual level.

install:
vip: 10.10.0.100
vip_mode: static
management_interface:
method: static
interfaces:
- name: eno1
hwAddr: "3C:52:82:AA:BB:CC"
ip: 10.10.0.11
subnet_mask: 255.255.255.0
gateway: 10.10.0.1
os:
dns_nameservers:
- 10.10.0.10
- 10.10.0.11
ntp_servers:
- 10.10.0.20

Here, the VIP 10.10.0.100 sits in the same /24 as the node’s address 10.10.0.11. All control plane and user access traffic to Harvester goes to the VIP. Each node also has its own stable IP in that range for SSH and low level troubleshooting. If you use DHCP instead, the installer will request an IP address for the node, but you still need to configure a static VIP because the keepalived configuration expects a fixed address.

From a connectivity standpoint, management network reliability directly influences cluster behavior. If the switch that provides the management VLAN fails, or if routing from clients to that VLAN is broken, the Harvester UI and API will be unavailable. If there is intermittent packet loss, you may see RKE2 control plane errors, Longhorn replica faults, or random VM migration failures. If nodes cannot reach each other on the management network, they may be marked NotReady, and etcd may lose quorum.

To avoid surprises, keep management network design simple and conservative. Use redundant switches if you can, with MLAG or similar upstream bonding for node NICs if your platform supports that. Keep broadcast domains reasonable in size, but do not overcomplicate the topology. For many environments, a single management VLAN per datacenter or rack group is enough, with firewalls and routing handling access from operators’ networks to that VLAN.

From a Kubernetes perspective, the management network is also where the Kube API server listens. By default, the RKE2 API server listens on the node’s management IP and the cluster VIP. You can verify with netstat or ss on a Harvester node and by looking at the kube-apiserver static pod manifest if you need to adjust listening interfaces. In most cases, the defaults are correct, and you should not modify them unless you have a very constrained environment.

The management network is also where Kubelet registers nodes and where CNI plugins handle the default pod network. That means that even if you create separate VLANs for VM data traffic, the basic Kubernetes pod network usually runs over the management NIC or bond. If you plan to support large guest Kubernetes clusters on Harvester, factor this into your bandwidth and quality of service design.

To get a quick overview of node connectivity from the cluster’s perspective, you can use standard Kubernetes commands.

Terminal window
# Show nodes and their management addresses as seen by Kubernetes
kubectl get nodes -o wide
# Check if the cluster VIP is reachable from a node
ssh rancher@harv-mgmt-1
ping -c 3 10.10.0.100
# Verify that kube-apiserver is listening on the VIP inside the cluster
kubectl get endpoints kubernetes -o yaml

The endpoints output shows which addresses Kubernetes considers valid access points for the API. In a healthy Harvester cluster, you see the VIP and the control plane node addresses listed.

When you combine all of this, the mental model is straightforward. The management network ties nodes together, carries control plane, storage, and default pod traffic, and exposes the cluster VIP for user access. If you treat it as a first class network with appropriate capacity and redundancy, Harvester behaves predictably. If you treat it as just another subnet without planning, most operational issues will eventually surface there.

6.2: VLAN And Untagged Networks With Linux Bridges In Harvester

Section titled “6.2: VLAN And Untagged Networks With Linux Bridges In Harvester”

VM networking on Harvester is built on Linux bridges and VLAN tagging. Harvester uses standard Kubernetes CNI for the pod network and Multus to attach additional interfaces for VMs. Under the hood, VM interfaces connect to Linux bridges on the host, and those bridges map to physical NICs and VLANs. Once you understand this mapping, you can design VM networks that align cleanly with your existing switching and routing.

There are two broad categories of VM network in Harvester. The first is untagged, sometimes referred to as access networks. In this mode, VM traffic exits the host on a physical interface without a VLAN tag, and the upstream switch port treats that traffic as belonging to its native VLAN. The second category is VLAN networks, where VM traffic is tagged with a specific VLAN ID on egress and the switch port is configured as a trunk that carries that VLAN.

When you create a network in the Harvester UI, such as a VLAN network with ID 200, Harvester generates a NetworkAttachmentDefinition in Kubernetes that describes the bridge and VLAN behavior. For example, a VLAN network named vlan-200-net might be represented as follows.

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: vlan-200-net
namespace: harvester-system
annotations:
harvesterhci.io/network-type: vlan
spec:
config: |
{
"cniVersion": "0.3.1",
"name": "vlan-200-net",
"plugins": [
{
"type": "bridge",
"bridge": "br-vlan-200",
"vlan": 200,
"ipam": {
"type": "static"
}
}
]
}

This configuration instructs the CNI bridge plugin to create or use a Linux bridge br-vlan-200 on each node and to tag traffic leaving that bridge with VLAN ID 200. The bridge plugin hooks into the chosen physical interface that you configured as the uplink in Harvester’s host NIC settings. When a VM attaches to this network, KubeVirt configures a tap interface for the VM in the pod namespace and connects that tap to br-vlan-200.

For untagged networks, the vlan field is omitted, and the bridge simply forwards untagged Ethernet frames to the underlying NIC. Harvester uses this pattern for management networks in single NIC designs where the same physical link carries both management and guest traffic, and for untagged VM networks when the upstream switch expects access mode behavior.

Conceptually, you can think of each Linux bridge as a virtual switch inside the node. The physical interface that connects to your top of rack switch is a trunk port or access port depending on how you configure the network. The VM’s NIC is a port on that virtual switch. The CNI bridge plugin takes care of wiring host NICs, bridges, and tap interfaces correctly.

The upstream switch configuration must match what Harvester expects. For VLAN networks, the switch port must be in trunk mode, allowing VLANs for your VM networks, and typically assigning an appropriate native VLAN for untagged traffic or management. For untagged VM networks, the port can be in access mode, but then you cannot also carry other VLANs unless you convert it to a trunk.

Harvester’s networking best practice guides describe typical scenarios such as a single NIC connected to a VLAN aware switch, multiple NICs with VLAN aware switches, and multiple NICs with non VLAN aware switches. In VLAN aware setups, the recommendation is to configure the switch port as a trunk, allow the management VLAN and any VM VLANs, and then configure Harvester networks accordingly. In non VLAN setups, you use separate physical interfaces or link aggregation to separate VM networks from management and storage where possible, accepting that traffic mixing is less flexible.

To bind a Harvester network to a particular physical NIC or bond, you adjust host network settings so that the CNI bridge uses that NIC as its lower interface. The exact mechanics vary slightly by release, but the key idea is that Harvester tags the NIC configuration for bridged mode and then uses that NIC to back specific VLAN and untagged networks.

From the VM’s perspective, all of this complexity collapses into a simple choice. The VM spec references one or more networks by name, and KubeVirt arranges for each network to appear as a virtio NIC with the correct Layer 2 connectivity. Here is a simple example with one VLAN backed network.

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: web-frontend-01
namespace: default
spec:
running: true
template:
metadata:
labels:
kubevirt.io/domain: web-frontend-01
spec:
domain:
devices:
interfaces:
- name: frontend
bridge: {}
networks:
- name: frontend
multus:
networkName: harvester-system/vlan-200-net

With this definition, the VM’s frontend interface connects to the vlan-200-net network, which maps to br-vlan-200 on the host and VLAN 200 on the upstream switch. You can assign IP addresses to the VM statically or via DHCP, depending on how you configure your network.

One subtle but important point is that pod networking and VM networking are separate concerns. Pods on the default cluster network typically use a cluster overlay or routed CNI network that runs over the management interface. VM networks via bridges and VLANs are usually used for direct connectivity to existing physical networks or to give VMs IP addresses from existing subnets. You can, in theory, attach VMs to the pod network as well, but most Harvester deployments treat VM networks as a way to plug VMs into the same layer 2 domains that existing servers use.

By keeping VM networking close to standard Linux and switch concepts, Harvester makes it easier to integrate with existing infrastructure teams. Once your network colleagues see that Harvester needs trunk ports carrying VLANs X and Y to specific NICs, and that VM NICs are effectively additional switch ports, the conversation becomes straightforward.

6.3: Multi NIC VMs, Multus NetworkAttachmentDefinitions And Service Exposure

Section titled “6.3: Multi NIC VMs, Multus NetworkAttachmentDefinitions And Service Exposure”

Single NIC VMs are fine for many workloads, but there are plenty of cases where you need multiple interfaces. You might have separate front end and back end networks, dedicated storage networks, management networks for out of band tools, or partner specific VLANs. KubeVirt and Harvester support multi NIC VMs by combining multiple Multus based NetworkAttachmentDefinition objects with multiple interfaces in the VM spec.

Multus acts as a meta CNI plugin. The primary pod network is still provided by your chosen CNI, such as Canal or Flannel, and Multus allows additional networks to be attached through definitions stored as NetworkAttachmentDefinition resources. Harvester uses this approach not only for VLAN networks but also for specialized scenarios such as migration networks or SR IO V NICs.

To build a multi NIC VM, you first define one or more NetworkAttachmentDefinition objects representing the networks you care about. One might represent a front end VLAN, another a back end VLAN, and another a storage network. Here is a simplified example with two networks.

apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: vlan-100-frontend
namespace: harvester-system
annotations:
harvesterhci.io/network-type: vlan
spec:
config: |
{
"cniVersion": "0.3.1",
"name": "vlan-100-frontend",
"plugins": [
{
"type": "bridge",
"bridge": "br-vlan-100",
"vlan": 100,
"ipam": { "type": "static" }
}
]
}
---
apiVersion: k8s.cni.cncf.io/v1
kind: NetworkAttachmentDefinition
metadata:
name: vlan-150-backend
namespace: harvester-system
annotations:
harvesterhci.io/network-type: vlan
spec:
config: |
{
"cniVersion": "0.3.1",
"name": "vlan-150-backend",
"plugins": [
{
"type": "bridge",
"bridge": "br-vlan-150",
"vlan": 150,
"ipam": { "type": "static" }
}
]
}

Assuming the upstream switch ports are trunks that allow VLANs 100 and 150, you can now attach both networks to a single VM.

apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: app-tier-01
namespace: default
spec:
running: true
template:
metadata:
labels:
kubevirt.io/domain: app-tier-01
spec:
domain:
devices:
interfaces:
- name: frontend
bridge: {}
- name: backend
bridge: {}
networks:
- name: frontend
multus:
networkName: harvester-system/vlan-100-frontend
- name: backend
multus:
networkName: harvester-system/vlan-150-backend

KubeVirt and Multus will then create two tap interfaces in the pod and connect them to the appropriate Linux bridges. Inside the guest, you will see two virtio NICs and can configure them as needed. One interface might receive an IP from a DHCP server on VLAN 100 and be used for user facing traffic. The other might receive or be assigned an IP on VLAN 150 and only accept connections from other application or database servers.

Service exposure patterns depend on how you want clients to reach these VMs. If VMs are part of an existing IP subnet, you can use DNS and routing in the same way you do for physical servers. Many teams choose to give VMs static IPs or DHCP reservations and register those addresses in internal DNS. This keeps integration simple for legacy applications that expect to talk to specific IPs or hostnames.

If your applications are more Kubernetes native, you might use services and ingress controllers inside guest RKE2 clusters running on Harvester rather than exposing individual VM NICs. In that model, VMs may host control plane nodes and worker nodes for guest clusters, and clients talk to services through Kubernetes LoadBalancer or Ingress resources. Harvester’s role is to provide stable networking for the guest nodes, while service abstraction lives in Kubernetes proper.

You can also mix these approaches. For example, you might have a multi NIC VM that acts as a network appliance, with one interface facing an external network and another facing an internal Kubernetes network. This VM could run a load balancer, firewall, or API gateway. Harvester’s network plumbing treats this as just another combination of bridges and VLAN tags. You still need to handle routing and security policies inside the appliance and your wider network.

One thing to be careful about with multi NIC designs is default routes inside the guest. The guest OS might choose one interface as the default route based on metric or configuration, which can create confusion if you expect front end traffic to exit one interface and back end traffic to exit another. When documenting your patterns, be explicit about which interface is considered primary and how you set up routing tables or policy based routing inside the guest where necessary.

Harvester also offers a special type of network for migration traffic. You can configure a dedicated migration network that KubeVirt uses during live migrations, reducing the load on your primary networks. This is done by creating a network attachment definition and then setting the vm-migration-network system setting to reference it. Once configured, migration traffic flows over that isolated network, which is particularly useful in clusters where VM data traffic and storage replication are heavy.

Service exposure for management interfaces and application ports follows the same basic structure you are used to from any VLAN based environment. The value Harvester adds is the ability to bind VMs to multiple networks cleanly using Kubernetes resources, while keeping the underlying machinery familiar to network engineers who understand Linux bridges and VLAN trunks.

6.4: Network Troubleshooting Packet Flow, Common Misconfigurations And Fixes

Section titled “6.4: Network Troubleshooting Packet Flow, Common Misconfigurations And Fixes”

Even with careful planning, networking issues will happen. When they do, having a clear model of packet flow through Harvester and knowing where to look at each layer can turn a frustrating incident into a manageable task. The key is to break the path into segments. Packets move from an external client or service to an upstream switch, to a host NIC, through a Linux bridge and tap interface, into the VM, and then back out. Control plane traffic follows similar paths but targets the VIP and node API servers.

A simple connectivity problem, such as a VM that cannot be reached on a particular port, can have many causes: incorrect VLAN tagging on the switch, wrong network selection in the VM spec, firewall rules inside the guest, incorrect default route, IP conflicts, or CNI misconfiguration. You narrow it down by testing connectivity step by step.

Start by validating that the node itself has the expected connectivity on the relevant network. From the Harvester host, test reaching the default gateway, DNS, and perhaps a known service.

Terminal window
# On the Harvester node via SSH
ip addr show
ip route show
# Test basic connectivity on the management network
ping -c 3 10.10.0.1 # gateway
ping -c 3 10.10.0.10 # DNS server
# If troubleshooting a VLAN backed VM network, test from the bridge
bridge link
bridge vlan show

The ip addr and ip route commands confirm that the host sees the correct addresses and routes. The bridge commands show how interfaces are attached to bridges and which VLANs are configured on them. If the bridge for your VM network does not exist or does not have your physical interface enslaved, you know the problem is on the host side configuration.

Next, look at the NetworkAttachmentDefinition and VM spec to see whether the expected network is actually being used.

Terminal window
# Check the network attachments
kubectl get network-attachment-definitions -n harvester-system
# Inspect the specific network definition
kubectl get network-attachment-definition vlan-200-net -n harvester-system -o yaml
# Check the VM's network section
kubectl get vm web-frontend-01 -n default -o yaml

If the VM spec does not reference the correct network, perhaps due to a template mistake or a manual override, packets will never reach the VLAN you think they are using. Correcting the VM configuration and restarting it will fix this kind of issue.

Assuming the VM is on the right network, move into the pod and check interfaces there.

Terminal window
# Find the pod hosting the VM
kubectl get pod -n default -l kubevirt.io/domain=web-frontend-01 -o wide
# Enter the pod's network namespace to inspect interfaces
POD=$(kubectl get pod -n default -l kubevirt.io/domain=web-frontend-01 -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n default -it "$POD" -- ip addr show
kubectl exec -n default -it "$POD" -- ip link show

In this context, you see the eth0, net1, net2, or similar interfaces associated with Multus networks, along with tap devices and the Linux bridges. If the expected interfaces are missing or down, there may be a CNI error, which you can confirm by checking logs of the Multus and bridge CNI plugins, usually running in pods in the kube-system or harvester-system namespaces.

Within the VM itself, you diagnose problems much like you would on a physical server. Check that the guest sees the expected NICs, that IP addresses and routes are correct, and that firewalls allow the traffic you need. It is common for cloud init or OS defaults to assign network configuration in ways that differ from what you expected based on interface names. Documenting which interface corresponds to which network attachment and verifying inside the guest is essential.

Common misconfigurations in Harvester networking tend to fall into a few categories. One category is incorrect switch port configuration. For example, administrators sometimes set a port to access mode on VLAN 100 but then create a VLAN network in Harvester with ID 100 and expect tag based trunk behavior. In that case, the Linux bridge is sending frames tagged with VLAN 100, but the switch port strips tags or drops the frames because it is configured for access traffic. The fix is to reconfigure the switch port as a trunk, allow VLAN 100, and set the native VLAN as needed.

Another category is mismatched VLAN IDs between Harvester and the network. If Harvester uses VLAN ID 200 in the NetworkAttachmentDefinition, but the upstream network expects VLAN 20 for that subnet, traffic will go nowhere useful. Always confirm that VLAN IDs and IP subnets match across Harvester, switch configuration, and routing. A small misalignment here can waste a lot of time.

A third frequent issue is mixing management and VM traffic unintentionally. In single NIC setups, it is possible to misconfigure the bridge assignments such that VM networks use the wrong interface, starving management traffic or creating loops. In production, adhere to the guidelines of using separate NICs or bonds for management and VM traffic where possible. When you do share, be very disciplined about bridge mapping and avoid overcomplicating tagging schemes.

From the Kubernetes perspective, one of the most confusing classes of problems is when network issues manifest as pod or VM scheduling failures. For instance, if a CNI plugin cannot contact its backend store due to network issues, pods can get stuck in ContainerCreating with CNI errors, and VMs will fail to start. Inspecting events with kubectl describe pod and kubectl describe vmi often surfaces messages about failing to attach interfaces or to reach IPAM services. These messages usually include enough detail to point you at the right layer, whether that is a CNI daemonset, a specific bridge configuration, or DNS resolution.

When you need to trace a full path, packet capture is still one of the most useful tools. Because Harvester runs on Linux with standard interfaces, you can run tcpdump on host NICs, on bridges, and inside VM pods.

Terminal window
# Capture traffic on the host's physical NIC
sudo tcpdump -i eno1 vlan 200 -nn
# Capture traffic on the Linux bridge for VLAN 200
sudo tcpdump -i br-vlan-200 -nn
# Capture inside the VM pod on a specific interface
POD=$(kubectl get pod -n default -l kubevirt.io/domain=web-frontend-01 -o jsonpath='{.items[0].metadata.name}')
kubectl exec -n default -it "$POD" -- tcpdump -i eth0 -nn

By comparing what you see at each point, you can determine whether packets are reaching the host from the network, whether they are crossing the bridge successfully, and whether they ever make it into the VM environment.

Finally, keep observability in mind. Harvester and RKE2 can integrate with metrics and logging systems that collect data about interface errors, dropped packets, and CNI health. Long term, having dashboards that show per node network throughput, error counts, and interface status helps you spot patterns such as steadily increasing errors on a particular NIC, or saturation on a specific VLAN during backup windows.

Networking in Harvester is not magic. It is a combination of Linux features, Kubernetes CNI plugins, and standard switching practices. Once you treat it as such and build a small toolkit of commands and mental models, troubleshooting becomes a process of verification and correction rather than trial and error.