Raymii.org
אֶשָּׂא עֵינַי אֶל־הֶהָרִים מֵאַיִן יָבֹא עֶזְרִֽי׃Home | About | All pages | Cluster Status | RSS Feed
Using nodeSelector to deploy a Kubernetes Helm chart only on x86/amd64 nodes, not arm64
Published: 11-07-2024 23:39 | Author: Remy van Elst | Text only version of this article
❗ This post is over one years old. It may no longer be up to date. Opinions may have changed.
My k3s cluster runs on Orange Pi Zero 3 small board computers, with a 1.5 GHz Allwinner H618 Quad-Core Cortex-A53 ARM64 CPU. Nowadays most popular software has support for aarch64 due to the popularity of boards like the Raspberry Pi and the Apple M1 series processors, but smaller projects or niche software often can only run on x86/amd64. If you write your own yaml files for deployment you can use a nodeSelector combined with the kubernetes.io/arch=amd64, but with a Helm Chart this is not that obvious. This small snippets shows you the correct syntax to force deploy a Helm Chart to only amd64 nodes in your cluster. This assumes you have a mixed cluster, I added a small virtual machine to it for testing.
This is my cluster

The version of Kubernetes/k3s I use
for this article is v1.29.6+k3s1.
The Kubernetes documentation on nodeSelector
is comprehensive and covers more than just forcing a node, also affinity and
more.
In my case I just want to deploy a Helm Chart, not fiddle with yaml. By default most Helm Charts
You can use the --set parameter to add a nodeSelector to your helm install:
--set nodeSelector."\.kubernetes\.io/arch"=amd64
For example, to install urunner, which currently does not work on arm64, use the following command:
helm upgrade --install urunner oci://ghcr.io/texano00/urunner/helm/urunner --version 0.1.0 --values values.yaml -n urunner --create-namespace --set nodeSelector."\.kubernetes\.io/arch"=amd64
One other project, canary-checker, has added arm64 support on my request! That now works
on my Orange Pi Zero 3 nodes, I hope that urunner will add support soon.