Raikerian / macos-virtual-kubelet

Virtual Kubelet implementation for macOS to support Virtualization for Pods
MIT License
0 stars 0 forks source link

Could you please confirm if this repository supports using Kubernetes to manage Mac machines for creating macOS VMs? #1

Open mio4kon opened 1 month ago

mio4kon commented 1 month ago

Could you please confirm if this repository supports using Kubernetes to manage Mac machines for creating macOS VMs? I'm not sure if I understand correctly?

Raikerian commented 1 month ago

Hi @mio4kon, thank you for your interest! This project indeed aims to bridge the worlds of Kubernetes and native macOS workloads with a Virtualization framework. While this does not include managing the underlying macOS host (I recommend utilizing any MDM solution for that), it does make it possible to connect it as a node to any Kubernetes cluster and deploy Pods with macOS VMs underneath. Basically, Kubernetes can be utilized as a scheduler and resource manager to deploy and manage macOS VMs at scale.

Unfortunately, this particular repo was just a quick POC by me to explore a few things and does not contain any working code.

The good news, however, is that the project exists in its complete form and is currently in a big-scale testing stage in a team I work for. I plan to open-source it this quarter and share how we use these native macOS workloads in an article. I will gladly update you once it is publicly available, or you can follow this organization as it will be hosted there: https://github.com/agoda-com

Looking forward to making it public and hoping there will be some use in macOS infrastructure community.

mio4kon commented 1 month ago

I am really looking forward to your organization's open-source initiative. This feature is very important to us.

Currently, we use the Tart tool on our Mac machines to create macOS virtual machines. However, we're unable to utilize our Kubernetes cluster (because our pipeline tasks are executed via Argo Workflows creating pods). Therefore, we hope to also be able to create macOS VMs through Kubernetes to perform macOS-specific tasks, such as iOS builds.

Raikerian commented 1 month ago

Your use case is similar to our mobile team's use of this new tool. They use gitlab runner Kubernetes executor, which is now running on these macOS nodes. Gitlab spawns a fresh VM over the Kubernetes for every job, ensuring a clean state between builds. This setup is relatively simple, as it just uses the kubectl exec feature, which the project implements using a local SSH connection to the VM from the host machine. So, no external connectivity to the macOS VM is required.

However, they have one more use case, spawning remotely accessible macOS VMs on demand. This setup is a bit more complicated as it requires externally available IP addresses (outside of the node network), which also involves a more complex signing process and a requirement for complete network control (need to be able to provide DHCP and native/tagged VLANs).

Both of these should conclude the internal testing stage by the end of August, and I will also try to prepare an article on our setup, which utilizes all of the above.