diff --git a/pkg/minikube/cluster/commands.go b/pkg/minikube/cluster/commands.go index 94f2c143b62d8f42962088050b19a2bd217782d3..047f0016f3549a400849998d25681780625459b2 100644 --- a/pkg/minikube/cluster/commands.go +++ b/pkg/minikube/cluster/commands.go @@ -40,6 +40,9 @@ var localkubeSystemdTmpl = `[Unit] Description=Localkube Documentation=https://github.com/kubernetes/minikube/tree/master/pkg/localkube +Wants=network-online.target +After=network-online.target + [Service] Type=notify Restart=always @@ -58,7 +61,7 @@ if which systemctl 2>&1 1>/dev/null; then {{.StartCommandSystemd}} sudo systemctl daemon-reload sudo systemctl enable localkube.service - sudo systemctl restart localkube.service + sudo systemctl restart localkube.service || true else sudo killall localkube || true {{.StartCommandB2D}}