Selecting nodes based on architecture

I’m running a test cluster on Raspberry Pis and one bigger machine as master and agent.

Cluster information:

Kubernetes version: v1.17.2+k3s1
Cloud being used: bare-metal (raspberry pis and x86 machine)
Installation method: k3s
Host OS: Ubuntu 18.04.4 LTS or 18.04.3 LTS
CNI and version: flannel v0.3.1 I believe
CRI and version:

Version:  0.1.0
RuntimeName:  containerd
RuntimeVersion:  v1.3.3-k3s1
RuntimeApiVersion:  v1alpha2

Some helm charts however don’t have arm or arm64 images and I would like to limit scheduling of those charts to machine with specific architectures.
What would be the most appropriate way to do so?
I see there are several labels and some other info which could be used, so I’m unsure which one to select and how.

$ kubectl get node rpi3p -o json
    "apiVersion": "v1",
    "kind": "Node",
    "metadata": {
        "..." // some other info
        "labels": {
            "": "arm64",
            "": "k3s",
            "": "linux",
            "": "rpi3p",
            "": "",
            "": "arm64",
            "": "rpi3p",
            "": "linux",
            "": "true",
            "": "k3s"
        "name": "rpi3p",
        "..." // other info
    "spec": {
        "podCIDR": "",
        "podCIDRs": [
        "providerID": "k3s://rpi3p"
    "status": {
        "addresses": [
                "address": "",
                "type": "InternalIP"
                "address": "rpi3p",
                "type": "Hostname"
        "allocatable": {
            "cpu": "4",
            "ephemeral-storage": "29642188777",
            "memory": "933992Ki",
            "pods": "110"
        "capacity": {
            "cpu": "4",
            "ephemeral-storage": "30471000Ki",
            "memory": "933992Ki",
            "pods": "110"
        "conditions": [ ... ],
        "daemonEndpoints": { ... },
        "images": [ ... ]
        "nodeInfo": {
            "architecture": "arm64",
            "bootID": "37de8048-af37-419e-89cb-c02187d29280",
            "containerRuntimeVersion": "containerd://1.3.3-k3s1",
            "kernelVersion": "4.15.0-1054-raspi2",
            "kubeProxyVersion": "v1.17.2+k3s1",
            "kubeletVersion": "v1.17.2+k3s1",
            "machineID": "a3c14b5eccab4034a96aa9de3ae0b371",
            "operatingSystem": "linux",
            "osImage": "Ubuntu 18.04.4 LTS",
            "systemUUID": "a3c14b5eccab4034a96aa9de3ae0b371"

Can I select by status.nodeInfo.architecture? Are labels better?
Thank you.

You can use nodeSelector on your pods to specify labels of the nodes you want to deploy to. The simplest solution is probably to add a specific label on the nodes you want to deploy your pods. See Assigning Pods to Nodes - Kubernetes for more information

Thank you.
So nodeSelector works on labels only and can’t select based on status.nodeInfo.architecture.
In that case would seem the most appropriate.

apiVersion: v1
kind: Pod
  name: nginx
    env: test
  - name: nginx
    image: nginx
    imagePullPolicy: IfNotPresent
  nodeSelector: arm64
1 Like