Running a K8S Deployment with pods scheduled in ARM-based and X68-based nodes

9/3/2019

I have a raspberry pie cluster( ARM-based CPU ) and a couple of virtual machines that run on an X86 based laptop, I was able to establish a K8S cluster atop my raspberry pie cluster and the other X86-based virtual machines .

I want to run a K8S deployment in this cluster with pods running the ARM-based docker image in Raspberry pie nodes and other pods running X86-based docker image in my X86-based virtual machines .

I wonder if there is any easy way to achieve this . Thanks in advance for your help.

-- mabbessi
kubernetes

1 Answer

9/3/2019

You can use a Selector/Affinity mechanisms and beta.kubernetes.io/arch label of the node which automatically assigned to each of them.

You can call kubectl describe node $nodename and check that label. On X86 it will be beta.kubernetes.io/arch=amd64, on ARM it will be different.

So, for X86 payload you can add node selector:

nodeSelector:
    beta.kubernetes.io/arch: amd64

Then K8s will spawn that payload only on X86 servers. The same thing you can do for your ARM payload.

-- Anton Kostenko
Source: StackOverflow