MacOS and Kubernetes: Agoda Brought Together the Traditionally Incompatible

Just a few months back Agoda was in the talks for its client-centric microservices migration and pretty soon the company’s again in the news for achieving the difficult feat of getting macOS and Kubernetes to be friends. The company announced its new solution macOS Virtualization Kubelet. Also called, macOS-vz-Kubelet, the tool seems a case study into understanding the deeper problems with macOS infrastructure that were making it difficult for developers to build applications using Kubernetes. Finding answers to these challenges, the company has now been able to bring together the security and hardware of Apple to work with the highly scalable containerization offered by K8s.

Why The Apple Seemed Forbidden?

Working with Apple infrastructure has its pluses and minuses. Agoda’s been significantly Apple-dependent when it comes to development. Which has led them to enjoy high-performance hardware, an optimized ecosystem, and better security. However, since the arrival of Apple's Silicon-based infrastructure, there have been compatibility issues with many popular CI/CD tools, virtualization tools, and Kubernetes environments. Here’s how these challenges were a hindrance for K8s and macOS:

  • Deprecation of KEXTs: Since Apple deprecated Kernel Extensions (KEXTs) for security reasons, virtualization frameworks like QEMU were slipping in their performance which made it difficult for Kubernetes to run workloads.
  • Virtual Device Farms: Older Kubernetes implementations only supported stateless workloads which meant that they were more comfortable with virtual device farms. This was not a good situation for macOS build machines and the CI/CD pipelines that used them. As a result, Kubernetes couldn’t efficiently run the build nodes. 

Key To Eden: What Brought K8s Around

Identifying the problem in the architecture shift, Apple introduced its virtualization framework that is aimed to help both Apple Silicon and Intel-based Mac systems with virtualization. With features for creating and managing VMs for Native macOS as well as Linux, the framework formed the basis for macOS-vz-Kubelet. Here’s how the solutions bring macOS and Kubernetes together:

  • Native management of macOS workloads: The solution doesn’t need QEMU or any other such virtualization tools. It allows Kubernetes to schedule and run macOS workloads on the native macOS itself.
  • Hardware support: With the support of Apple’s framework, the VMs can run much smoother on the Apple Silicon-based hardware. This accelerates the tasks for CI/CD pipelines including compilation and testing.
  • Hybrid Runtime Pods: Agoda built runtime pods that allow containers to run on macOS VMs while Docker helps with dependency management, logging, and other such tasks. These hybrid pods allow Kubernetes and CI/CD workflows to run automatically and handle multiple processes.
  • Open Container Initiative (OCI) Compliance: Agoda also developed OCI-compliant VM images for macOS which helped with scalability and automation in Kubernetes.

Conclusion

Making an open-source tool work for a famously guarded infrastructure like that of macOS was definitely a difficult feat. However, understanding the underlying problems was all that Agoda needed to make Kubernetes and Apple Silicon to work together. macOS-vz-Kubelet is an essential next step in DevOps-driven digital ecosystems. With Apple’s efficiency and K8s’ capabilities, we can expect many high-performance innovations in the near future.

How 1Password boosted productivity 10x by delegati ...

MyKubert - Meta’s AI-powered auto-healing for Ku ...