Change:
Right now we create 3 daemonsets for in , but will only give use image names for , so this feature is broken. We should only deploy one daemon set for the native architecture, but ensure it has the right label selectors, so we don't try to run pods on nodes of different architecture. We should also make sure all addons have architecture labels, and not just . If user is building heterogeneous clusters, the will need to take about deploying addons for additional architectures, we shouldn't pre-deploy multiple things knowing that they will most likely remain unschedulable.
I have the same issue as well. I tried to create a cluster with x86 (Intel NUC) and arm (Raspberry-Pi) and I see that the kube-proxy is crashing. Here's the log entry from kube-proxy Logs from kube-proxy exec user process caused "exec format error" Attached is the kube-proxy yaml file. I see that its picking up arm image Don't know how to fix this.

Discussion:
"fmt" "net" "path" <del> "runtime" </del> kubeadmapi "k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm" "k8s.io/kubernetes/cmd/kubeadm/app/images"

"k8s.io/kubernetes/pkg/util/intstr" ) <del> // TODO(phase1+): kube-proxy should be a daemonset, three different daemonsets should not be here func createKubeProxyPodSpec(cfg *kubeadmapi.MasterConfiguration, architecture string) api.PodSpec { </del> <ins> func createKubeProxyPodSpec(cfg *kubeadmapi.MasterConfiguration) api.PodSpec { </ins> envParams := kubeadmapi.GetEnvParams() privilegedTrue := true return api.PodSpec{ SecurityContext: &api.PodSecurityContext{HostNetwork: true}, <del> NodeSelector: map[string]string{ "beta.kubernetes.io/arch": architecture, }, </del> Containers: []api.Container{{ Name:            kubeProxy, Image:           images.GetCoreImage(images.KubeProxyImage, cfg, envParams["hyperkube_image"]),

) return api.PodSpec{ <del> NodeSelector: map[string]string{ "beta.kubernetes.io/arch": runtime.GOARCH, }, </del> Containers: []api.Container{ // DNS server {

} func CreateEssentialAddons(cfg *kubeadmapi.MasterConfiguration, client *clientset.Clientset) error { <del> arches := [3]string{"amd64", "arm", "arm64"} for _, arch := range arches { kubeProxyDaemonSet := NewDaemonSet(kubeProxy+"-"+arch, createKubeProxyPodSpec(cfg, arch)) SetMasterTaintTolerations(&kubeProxyDaemonSet.Spec.Template.ObjectMeta) </del> <ins> kubeProxyDaemonSet := NewDaemonSet(kubeProxy, createKubeProxyPodSpec(cfg)) SetMasterTaintTolerations(&kubeProxyDaemonSet.Spec.Template.ObjectMeta) SetNodeAffinity(&kubeProxyDaemonSet.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity()) </ins> <del> if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil { return fmt.Errorf("<master/addons> failed creating essential kube-proxy addon [%v]", err) } </del> <ins> if _, err := client.Extensions().DaemonSets(api.NamespaceSystem).Create(kubeProxyDaemonSet); err != nil { return fmt.Errorf("<master/addons> failed creating essential kube-proxy addon [%v]", err) </ins> } fmt.Println("<master/addons> created essential addon: kube-proxy") kubeDNSDeployment := NewDeployment("kube-dns", 1, createKubeDNSPodSpec(cfg)) SetMasterTaintTolerations(&kubeDNSDeployment.Spec.Template.ObjectMeta) <ins> SetNodeAffinity(&kubeDNSDeployment.Spec.Template.ObjectMeta, NativeArchitectureNodeAffinity()) </ins> if _, err := client.Extensions().Deployments(api.NamespaceSystem).Create(kubeDNSDeployment); err != nil { return fmt.Errorf("<master/addons> failed creating essential kube-dns addon [%v]", err)

import ( "encoding/json" "fmt" <ins> "runtime" </ins> "time" "k8s.io/kubernetes/cmd/kubeadm/app/images"

meta.Annotations[api.TolerationsAnnotationKey] = string(tolerationsAnnotation) } <del> func SetMasterNodeAffinity(meta *api.ObjectMeta) { </del> <ins> // SetNodeAffinity is a basic helper to set meta.Annotations[api.AffinityAnnotationKey] for one or more api.NodeSelectorRequirement(s) func SetNodeAffinity(meta *api.ObjectMeta, expr ...api.NodeSelectorRequirement) { </ins> nodeAffinity := &api.NodeAffinity{ RequiredDuringSchedulingIgnoredDuringExecution: &api.NodeSelector{ <del> NodeSelectorTerms: []api.NodeSelectorTerm{{ MatchExpressions: []api.NodeSelectorRequirement{{ Key: "kubeadm.alpha.kubernetes.io/role", Operator: api.NodeSelectorOpIn, Values: []string{"master"}, }}, }}, </del> <ins> NodeSelectorTerms: []api.NodeSelectorTerm{{MatchExpressions: expr}}, </ins> }, } affinityAnnotation, _ := json.Marshal(api.Affinity{NodeAffinity: nodeAffinity})

meta.Annotations[api.AffinityAnnotationKey] = string(affinityAnnotation) } <ins> // MasterNodeAffinity returns api.NodeSelectorRequirement to be used with SetNodeAffinity to set affinity to master node func MasterNodeAffinity() api.NodeSelectorRequirement { return api.NodeSelectorRequirement{ Key: "kubeadm.alpha.kubernetes.io/role", Operator: api.NodeSelectorOpIn, Values: []string{"master"}, } } // NativeArchitectureNodeAffinity returns api.NodeSelectorRequirement to be used with SetNodeAffinity to nodes with CPU architecture // the same as master node func NativeArchitectureNodeAffinity() api.NodeSelectorRequirement { return api.NodeSelectorRequirement{ Key: "beta.kubernetes.io/arch", Operator: api.NodeSelectorOpIn, Values: []string{runtime.GOARCH}, } } </ins> func createDummyDeployment(client *clientset.Clientset) { fmt.Println("<master/apiclient> attempting a test deployment") dummyDeployment := NewDeployment("dummy", 1, api.PodSpec{

} SetMasterTaintTolerations(&kd.Deployment.Spec.Template.ObjectMeta) <del> SetMasterNodeAffinity(&kd.Deployment.Spec.Template.ObjectMeta) </del> <ins> SetNodeAffinity(&kd.Deployment.Spec.Template.ObjectMeta, MasterNodeAffinity(), NativeArchitectureNodeAffinity()) </ins> return kd }