mikelangelo-project / osv-microservice-demo

Simple Node.js Microservice application use to demonstrate the use of OSv and Capstan
13 stars 1 forks source link

Cloud this support kubernetes volume? #11

Open Crazykev opened 7 years ago

Crazykev commented 7 years ago

Hi @miha-plesko @gberginc, After look through all the demo description, I didn't find anything about kubernetes volume. Many key concept(such as secret, configmap, user volume, even resolv.conf) rely on this. AFAICT, unikernel doesn't support bind mount host directory into VM, so is this solved or you've workaround for this? Thanks.

miha-plesko commented 7 years ago

Hello @Crazykev , thanks for opening this question. Quick answer to your question is: volume mounting on Kubernetes should be supported soon, but we haven't looked at it yet.

In general OSv unikernel supports attaching volume as we've already tested it on OpenStack the other day. Furthermore, OSv unikernel does support clud-init paradigm (NoCloud CloudInit* and OpenStack CloudInit), which was also tested on OpenStack.

* NoCloud CloudInit that OSv can use must be slightly customized than the official NoCloud CloudInit since OSv currently does not support iso9660 filesystem.

However, since the Virtlet runtime that we're using to run OSv unikernels only recently added support for attaching volumes and NoCloud clud-init paradigm, we didn't have chance to verify yet how it works out for OSv unikernels. But let me share you my expectations:

Please let me know if this answers your question.

gberginc commented 7 years ago

Thanks for summarising @miha-plesko.

We are currently working on adding support for NoCloud cloud-init based on ISO because this will simplify the integration into other platforms as well (for example, the HPC environment we are using it in also relies on this approach). Shouldn't be a problem.

Adding external volumes should be possible, but they have to be provided to the VMs as images (e.g. qcow2, raw) and not mounted as directories from the host (I think OSv currently does not support this). This should be part of the libvirt domain config that's built by Virtlet, which will then also allow OSv to see it as a device while booting. ZFS requirement is a bit more cumbersome, but currently OSv only supports this filesystem.

resouer commented 7 years ago

@miha-plesko @gberginc Nice post! So what do you think is the typical case for Kubernetes + Unikernels in your mind? Should volume support play the role as in the normal container use cases?