r/kubernetes • u/LA33R • 1d ago
CSI Driver for Hyper-V
Hey!
So, I've been running a K3S cluster on Hyper-V for a while now and have come across a little bit of what I would call - an inability to find a suitable CSI driver for Hyper-V.
There are some available; however from looking into it - they appear to require you to share administrator credentials with Kubernetes along with a network route. Another method I see often quoted is to pass-through a network path to the SAN, share SAN credentials and use the SAN CSI provider - however this kind of breaks the storage network's isolation.
The final method which I personally use is Longhorn - but it's replicated between nodes and obviously takes up multiples of storage requirements - meaning you burn storage at least twice as fast as you need to.
---
To be transparent, I'm building this with Claude completely end to end. I have personal interests and after the day job - I want to make fast progress with this so I can use it - after a working product I'll probably slow down and go through it thoroughly - but if anyone else wants a Hyper-V CSI Driver which passes through the native VHDX file; I welcome any comments on it. I also welcome anyone's testing and feedback - as to be fair, although heavily AI driven in development, I do intend to eventually settle on a stable and trustworthy CSI driver that I can use for my personal endeavours.
Appreciate your reading. If you do happen look at the repo; please look at csi-implementation branch.
https://github.com/ODickins/HyperVolume
Edit: flick to main branch.
3
u/addy3006 1d ago
I'd test the ugly case early: a node VM hangs while it still holds the VHDX and the pod gets rescheduled. Does the driver detach it from the old VM by force, or wait for someone to confirm that VM is really off?
1
u/intersectRaven 1d ago
I love the idea actually. Makes it simpler when I already have a set configuration for HyperV.
3
u/OutcomeMaster6678 1d ago
Hot attaching VHDX files works.