diff --git a/pkg/minikube/node/start.go b/pkg/minikube/node/start.go index f4031029b3..94494b6b6e 100644 --- a/pkg/minikube/node/start.go +++ b/pkg/minikube/node/start.go @@ -205,6 +205,13 @@ func restartKubeletIfNeeded(starter Starter) error { if err := sysinit.New(starter.Runner).Restart("kubelet"); err != nil { return errors.Wrap(err, "restarting kubelet") } + cp, err := config.PrimaryControlPlane(starter.Cfg) + if err != nil { + return errors.Wrap(err, "control plane") + } + if err := machine.AddHostAlias(starter.Runner, constants.ControlPlaneAlias, net.ParseIP(cp.IP)); err != nil { + return errors.Wrap(err, "adding host alias") + } return nil }