Raymii.org
Quis custodiet ipsos custodes?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
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.
Recently I removed all Google Ads from this site due to their invasive tracking, as well as Google Analytics. Please, if you found this content useful, consider a small donation using any of the options below:
I'm developing an open source monitoring app called Leaf Node Monitoring, for windows, linux & android. Go check it out!
Consider sponsoring me on Github. It means the world to me if you show your appreciation and you'll help pay the server costs.
You can also sponsor me by getting a Digital Ocean VPS. With this referral link you'll get $200 credit for 60 days. Spend $25 after your credit expires and I'll get $25!
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.