Skip to main content
With Orka On-Prem, you can now effortlessly integrate macOS development and macOS CI/CD into your On-Prem Mac Compute and Kubernetes-based workflows and environments. Don’t have Kubernetes experience on-prem? Don’t worry, MacStadium can configure a Hybrid Cluster using any Managed k8s Service like AWS Elastic Kubernetes Service, Google Kubernetes Engine, Azure Kubernetes Service, or using MacStadium hosted Kubernetes.

How does Orka On-Prem work?

The diagram below illustrates the architecture of an Orka Cluster On-Prem, detailing how it integrates with Kubernetes 1.35, Mac compute hosts, and OCI Registries for image storage. Orka On-Prem architecture diagram showing Kubernetes, Mac nodes, and OCI registry The Kubernetes 1.35 Cluster provides a runtime for the Orka Cluster Services. The Mac hosts are set up with Orka Engine (VM Runtime), which provides a stable runtime for virtual machines. VMs are deployed to the host using an OCI image, which can be fetched from any OCI registry, such as Artifactory, GitHub Container Repo (GHCR), or Amazon ECR. The use of OCI images enables sub-minute deployment of different macOS versions, pre-configured with various tools and optionally with SIP (System Integrity Protection) disabled. This addresses challenges that typically exist on Mac without Orka VMs. CI tools will integrate via the Orka API installed into Kubernetes, or the CLI or API it exposes to orchestrate workloads, including spin-up and tear-down of VMs, and scheduled caching of images as needed. Key elements in the architecture include:
  • A private network configuration for Orka.
  • A dedicated Kubernetes 1.35 cluster, which runs Orka Cluster Services for orchestration and automation.
  • Mac Nodes to be used for compute, usually on-prem.
  • An OCI Registry such as Artifactory, GitHub Container Registry, Docker Registry, AWS ECR, or others.
  • A load balancer for Orka Users to interact with the Orka Services on Kubernetes via CLI, API, or CI tools.

Networking Considerations

The Orka VMs use the 192.168.64.0/24 network. This is a virtual network on each of the hosts and it is not directly accessible. You might experience issues if your Orka VMs need to access services that are in a network that overlaps with their virtual network. For the Apple silicon nodes, the following ports should be open to all networks that need access to the VMs: TCP 5900-6200 (Screenshare), TCP 5999-6299 (VNC), and TCP 8822-9122 (SSH). In general, we recommend allowing outbound requests uniformly for forward compatibility.
NOTE: SSH/Screen Share/VNC ports are globally tracked and allocated. The ranges given above are applicable to each Apple silicon node.

Install Steps

Kubernetes Requirements and Initial Steps

Orka requires a dedicated Kubernetes 1.35 cluster to run.
  • Orka requires a dedicated cluster because it limits certain cluster operations (such as what namespaces can be created and what pods can be deployed), and user management is generally more restrictive.
We recommend following the official guidelines for setting up a Kubernetes cluster. The official recommended tool for setting up Kubernetes clusters is kubeadm. If you are familiar with Ansible, you could also use Kubespray to set up your cluster. If you do not have experience with Kubernetes, MacStadium can host and manage the Kubernetes cluster for you in our Data Centers, or you can use an AWS EKS service to run your Orka Cluster Services. The following assumes you are installing and managing your own Kubernetes cluster.

Setting up OIDC for Authentication

Orka uses OIDC for user authentication. Make sure to configure the MacStadium OIDC provider in your Kubernetes cluster. This can be done by setting the following values for your Kubernetes API Server:
If you are using kubeadm to set up your cluster, you can pass these values as extra args to the apiServer property in the ClusterConfiguration resource:
Alternatively, you could also add these manually as ApiServer arguments by editing the ApiServer config file (usually /etc/kubernetes/manifests/kube-apiserver.yaml).

Obtaining an Orka License Key

Your license key is included in your order confirmation from MacStadium. If you don’t have it, retrieve it from the customer portal or contact support@macstadium.com. For portal access and credential details, see Managing your Orka license. Add your license key to cluster.yml under orka_engine_license_key before running the installer (see below).

Installing the Orka Cluster Services

MacStadium provides the Orka Cluster Services installer as a public container image on GitHub Container Registry (GHCR). You will need an environment with outbound internet access to pull the Ansible image, connectivity to the Kubernetes API, and cluster admin access.
  1. Ensure the Ansible runner is set up correctly:
  2. The Ansible runner must have connectivity to the cluster API.
  3. The Ansible runner must have Cluster Admin privileges to set up the cluster (i.e. a kube config with admin privileges)
  4. On the host create a file called cluster.yml. This file will contain Ansible variables needed for the Orka setup. Add the following content:
  1. Run the Ansible container:
where <kube_config_location> is the path to your kubeconfig (typically ~/.kube/config), cluster.yml is the file created in the previous step, and <version_tag> is the Orka version you are installing (e.g. 3.6.0).
  1. Make sure you are in the /ansible directory
  2. You can now run the Ansible playbook:

Exposing the Orka API Service

To use the CLI, you need access to the Orka API service, which is also utilized by some integrations (e.g., Jenkins).
orka3 vm push requires an Orka API token. Run orka3 login or orka3 user set-token before pushing images.
On-prem deployments commonly use certificate-based kubeconfig authentication, which is not sufficient for vm push. If you encounter an Unauthorized error from vm push, this indicates a missing Orka API token, not an OCI registry issue. Currently, the service is exposed as ClusterIP service called orka-apiserver in the default namespace. One way to expose the service is to use something like MetalLB to expose the service as LoadBalancer so it can be reached from outside the cluster.

Cluster Admin Access

By default, Orka’s validator webhooks restrict certain operations (including deleting another user’s VM) to cluster admins only. On AWS and on-prem deployments, cluster admin status must be explicitly configured. This differs from MacStadium-hosted clusters, where kubeadm automatically establishes the kubeadm:cluster-admins group. The default admin group for AWS and on-prem is orka:cluster-admins. To use a different group, set the cluster_admin_group Ansible variable before running the installation playbook. To grant a user cluster admin access, add them to the orka:cluster-admins group (or your configured group) in your identity provider.

Web UI

The Orka Web UI is not actively maintained and is not recommended for production use. If you need to access it, you can expose the web UI service using an ingress controller or load balancer; see Exposing the Orka API Service for the approach.

Setting Up Mac Nodes

Prerequisites

All of your Mac nodes need to:
  1. Have a common user created. This user needs admin privileges
  2. SSH is enabled for this user
  3. An SSH key is setup for this user, so that SSH connections using SSH keys are allowed
  4. python3

Setup

MacStadium provides another Ansible playbook that allows you to configure your Mac nodes with the software needed to run these nodes as Kubernetes worker nodes. To set up the Mac Nodes:
  1. Ensure the cluster.yml file is present and the values are correct
  2. Create a new file called nodes.yml with the following content:
  1. Create an inventory file called hosts with the following content:
  1. Run the same Ansible image that was used to configure the Orka services:
where <kube_config_location> is the path to your kubeconfig (typically ~/.kube/config), <mac_ssh_key_location> is the SSH key used to connect to the Mac nodes, and <version_tag> is the Orka version (e.g. 3.6.0).
  1. Ensure you are in the /ansible directory.
  2. Run the configuration playbook:
You will be asked for the ansible_user password. This is needed so that Ansible can set up autologin for the hosts. This is needed so you can run Sequoia VMs.

Setting Up Backups

Orka backups are exports of the Orka specific resources within the cluster:
  1. Orka Nodes
  2. Virtualmachine configs
  3. Service Accounts
  4. RoleBindings
There are two main ways to backup the Orka resources:
  1. Implement the backup logic yourself
    1. You define the resources that need to be backed up and how often
    2. You define where the backups are stored
  2. Use the functionality provided by MacStadium
    1. MacStadium provides an Ansible playbook that:
    2. Sets up a cronjob that runs every 30 min by default
    3. The cronjob exports the resources mentioned above by default
    4. The job stores the backups in an S3 bucket that you have specified

Using The MacStadium Provided Backup

To use the MacStadium provided functionality you need to:
  1. Create an AWS S3 bucket and generate AWS access id and secret access key that provide permissions to write to the bucket
  2. Run the Ansible image provided by MacStadium and mount a backup.yml file with the following content
  1. Run the container
  1. Run the backup playbook inside the /ansible folder

Implementing Your Own Backup

The recommended way to backup Orka resources is via a CronJob, similar to what MacStadium provides out of the box. The resources you need to backup are:
  1. All namespaces with the label orka.macstadium.com/namespace
Note - we are removing some metadata as otherwise restore would fail.
  1. OrkaNodes, VirtualMachineConfigs, ServiceAccounts, Rolebindings from these namespaces Note - you need to remove some metadata from these resources. To do that, run the following:
These resources can be stored in a yml file, which you can archive and store somewhere.

Logging, Monitoring, and Alerting

OpenTelemetry Standards

Logging and monitoring conform to OpenTelemetry best practices, meaning that metrics can be scraped from the appropriate resources via Prometheus and visualized with Grafana using Prometheus as a data source. Logs can be exposed on Mac workers by installing a promtail service, allowing them to be aggregated through Loki.

Key Log Sources

Orka v3.4+ Log Sources

Key Metrics

A list of metrics covering the following is available: Orka API Server, Orka Operator Metrics.

Troubleshooting

For help diagnosing failed VM deployments, locked keychain errors, and Virtual Kubelet issues on on-prem nodes, see the Orka Anywhere On-Prem Troubleshooting guide.