How platform sensitive is Kubernetes with Docker?

How platform sensitive is Kubernetes and Docker?

That is, can I build a cluster on disparate hardware?

Suppose, for example, I have a REST api I've written in ASP.NET Core. The language and development environment is generally cross-platform.

I can then build a Docker container for my API, and I can even build a multi-arch container, so images built from my container will run on both ARM and AMD64.

Can I then build a Kubernetes cluster on mixed ARM and Intel/AMD hardware?

If I do, do all of the images I deploy have to be multi-arch?

Or can I have single-arch images, and expect that K8S will be smart enough to only schedule single-arch images on nodes that can support them?


You can get a Kubernetes cluster with multiple architectures, by adding an arm64 node to an existing amd64 cluster, or vice versa.

Not all images need to be multi-arch, but you need to use Node Affinity or Taints and Tolerations so that the cluster can schedule each container to nodes of the appropriate architecture.