diff --git a/src/internal/cluster/injector.go b/src/internal/cluster/injector.go index f89bfbf491..a472b18205 100644 --- a/src/internal/cluster/injector.go +++ b/src/internal/cluster/injector.go @@ -304,7 +304,7 @@ func (c *Cluster) buildInjectionPod(node, image string, payloadConfigmaps []stri pod.Labels[agentLabel] = "ignore" // Bind the pod to the node the image was found on - pod.Spec.NodeSelector = map[string]string{"kubernetes.io/hostname": node} + pod.Spec.NodeName = node // Do not try to restart the pod as it will be deleted/re-created instead pod.Spec.RestartPolicy = corev1.RestartPolicyNever