Enabling Dual‑Stack Networking in KubeVirt with managedTap (Bridge Mode)
This guide explains how to use KubeVirt 1.4's managedTap feature to configure IPv4/IPv6 dual‑stack networking in bridge mode without modifying source code, covering subnet preparation, plugin registration, and virtual‑machine definition with example YAML and kubectl commands.
Background – As Kubernetes becomes the standard for modern application deployment, KubeVirt extends its capabilities by supporting virtual machines. Enabling IPv4 and IPv6 dual‑stack networking on VMs traditionally required source‑code modifications, which increased upgrade and maintenance costs.
KubeVirt 1.4 introduces managedTap , a new DomainAttachmentType that provides a TAP + Bridge based binding method, allowing dual‑stack support without source changes and simplifying configuration.
How managedTap works – managedTap automates the creation and configuration of the required network devices, offering a bridge binding without IPAM. Unlike the classic bridge mode where the VM relies on the virt‑launcher DHCP server, managedTap delegates DHCP management to Kube‑OVN.
Steps to enable dual‑stack with Kube‑OVN bridge forwarding
1. Enable DHCP and IPv6 RA on a Kube‑OVN subnet . Example YAML:
apiVersion: kubeovn.io/v1
kind: Subnet
metadata:
name: dual-stack-subnet
spec:
cidrBlock: "10.244.0.0/16,fd00:10:244::/64"
enableDHCP: true
enableIPv6RA: true2. Register the managedTap network binding plugin with KubeVirt using a patch command:
kubectl patch kubevirts -n kubevirt kubevirt \
--type=json -p='[{"op": "add", "path": "/spec/configuration/network", "value": {"binding": {"managedtap": {"domainAttachmentType": "managedTap"}}}}]'3. Create a virtual machine that uses the managedTap interface . Example VM manifest snippet:
apiVersion: kubevirt.io/v1
kind: VirtualMachine
metadata:
name: dual-stack-vm
namespace: default
spec:
running: false
template:
spec:
domain:
devices:
interfaces:
- name: default
binding:
name: managedtap
networks:
- name: default
pod: {}By following these steps, you can enable dual‑stack networking for VMs under bridge forwarding without altering KubeVirt source code, simplifying configuration and easing future upgrades.
References and further reading are provided at the end of the original article.
Cloud Native Technology Community
The Cloud Native Technology Community, part of the CNBPA Cloud Native Technology Practice Alliance, focuses on evangelizing cutting‑edge cloud‑native technologies and practical implementations. It shares in‑depth content, case studies, and event/meetup information on containers, Kubernetes, DevOps, Service Mesh, and other cloud‑native tech, along with updates from the CNBPA alliance.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.