Skip to content
This repository was archived by the owner on Mar 19, 2026. It is now read-only.

KroderDev/vcluster-vnode-plugin

Repository files navigation

vcluster-vnode-plugin

This plugin is intended to make vCluster work correctly with github.com/kroderdev/vnode.

Why it exists

When a pod inside vCluster is assigned to a vnode, its spec.nodeName points to a virtual node name like vnode-*.

That node name does not exist as a real schedulable host node, so sending it unchanged to the host cluster causes problems.

This plugin fixes that by:

  • clearing vnode-based spec.nodeName before the host pod is created
  • storing the original vnode name in vnode.kroderdev.io/node-name
  • restoring that vnode name when the host pod is read back into vCluster

This allows the host cluster to schedule onto a real node while vCluster still sees the pod as bound to the vnode.

Behavior

For pods with spec.nodeName starting with vnode-:

  • on create: move the node name into a label and clear spec.nodeName
  • on get: restore spec.nodeName from the label

Pods without a vnode-style node name are left unchanged.

Development

Run tests:

go test ./... -v -coverprofile=coverage.out -covermode=atomic

Build:

go build -o bin/

Build image:

docker build -t ghcr.io/kroderdev/vcluster-vnode-plugin:dev -f Dockerfile .

About

vCluster plugin for integrating vCluster pod sync with KroderDev vnode virtual nodes

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors