Ensure that the source machine that is building your image is the correct architecture type.
https://www.reddit.com/r/kubernetes/comments/13lurdl/kubernetes_error_exec_usrlocalbinyarn_exec_format/?rdt=39252For instance, if you are building a K8's cluster running linux (x86) but have built the image locally on a Apple M2 Mac (ARM based), then you will need to instruct docker to use the build x command to build a multi-platform build or change the source build machine.