diff --git a/install.sh b/install.sh index 00035ece12..be08bbcbf8 100755 --- a/install.sh +++ b/install.sh @@ -643,6 +643,7 @@ create_systemd_service_file() { [Unit] Description=Lightweight Kubernetes Documentation=https://k3s.io +After=network-online.target Wants=network-online.target After=network-online.target diff --git a/k3s.service b/k3s.service index 8da71c7d9c..377e40560c 100644 --- a/k3s.service +++ b/k3s.service @@ -2,6 +2,7 @@ Description=Lightweight Kubernetes Documentation=https://k3s.io After=network-online.target +Wants=network-online.target [Service] Type=notify diff --git a/package/rpm/install.sh b/package/rpm/install.sh index 7e976a6a45..3e2ac5411a 100755 --- a/package/rpm/install.sh +++ b/package/rpm/install.sh @@ -648,6 +648,7 @@ create_systemd_service_file() { [Unit] Description=Lightweight Kubernetes Documentation=https://k3s.io +After=network-online.target Wants=network-online.target After=network-online.target Conflicts=${conflicts}