LabHub

Blog

KubeVirt Network 2: Comparing bridge, masquerade, passt, and SR-IOV Bindings

한국어English日本語

Introduction

When understanding KubeVirt networking, the most important choice is the binding. Even for the same VMI, the way the guest sees the network, service exposure method, performance, and live migration suitability change depending on which binding is used.

Looking at staging/src/kubevirt.io/api/core/v1/schema.go, the main interface binding types are revealed:

KubeVirt does not force a single correct network model. Instead, it provides multiple wiring approaches.

What Does Binding Exactly Mean

As the official developer guide docs/network/network-binding-plugin.md summarizes well, a binding is the layer that defines "how to connect a domain VM NIC to the guest inside the Pod."

This includes:

A binding is not just an API option but a guest NIC wiring strategy.

1. Masquerade Binding

The most straightforward and Kubernetes-friendly default choice.

How It Works

Advantages

Disadvantages

This is the first choice to consider due to operational convenience and versatility.

2. Bridge Binding

Bridge binding is a model for connecting the guest more directly to the network.

How It Works

Advantages

Disadvantages

Bridge leans more toward "exposing the guest more directly" rather than "safe defaults like containers."

3. Passt Binding

schema.go places PasstBinding as a separate core binding. passt is best understood as a user-mode networking approach.

Advantages

Disadvantages

Reading pkg/network/passt and the binding plugin documentation together, you can see that passt is closer to user-mode friendly networking than "high-performance L2 direct connection."

4. SR-IOV Binding

SR-IOV is the most performance-oriented choice. However, Kubernetes, host, NIC, IOMMU, and VFIO configuration must all align.

Looking at docs/network/sriov.md, there are quite a few related components:

How It Works

Advantages

Disadvantages

SR-IOV is not a general-purpose default but a choice that trades some simplicity and flexibility for performance.

Why Plugin Bindings Are Needed

KubeVirt does not try to cover all networks with built-in bindings alone. network-binding-plugin.md explains two directions:

The key is that plugins make new bindings extensible by combining domain attachment types, sidecars, and custom CNIs.

This design shows KubeVirt's intention not to put all network experimentation and extensions into core code.

How IP Models Differ by Binding

This is a point operators frequently get confused about.

Masquerade

Bridge

Passt

SR-IOV

The answer to "who gives the IP" also changes by binding.

Relationship with Migration

Binding is not just a connectivity choice but also significantly impacts migration strategy.

network-binding-plugin.md also explains that binding plugins need separate migration method declarations to support migration.

Common Misconceptions

Misconception 1: Bridge Is Always Better Than Masquerade

No. More direct connectivity can be an advantage, but operational simplicity and migration friendliness may be better with masquerade.

Misconception 2: SR-IOV Is Just a Faster NIC Option

No. It's a complex choice involving device advertising, CNI, VFIO, IOMMU, and libvirt domain configuration all together.

Misconception 3: Plugin Bindings Are Just Decorations for Core Bindings

No. It's an important design for KubeVirt to handle network extensions modularly.

Practical Selection Criteria

Ultimately, binding is simultaneously a performance issue and an operability/migration possibility issue.

Conclusion

KubeVirt's network bindings are the core axis determining how to wire guest NICs inside Pods. masquerade has versatility and operational convenience, bridge has more direct connectivity, passt has user-mode characteristics, and SR-IOV has high-performance device passthrough. Therefore, binding selection is not a simple API option but an architectural choice that determines the entire network model and operational strategy.

In the next article, we will look beyond primary networks at how Multus and secondary networks connect to KubeVirt.

Comments

No comments yet.

Sign in to leave a comment