diff --git a/roles/kubernetes/preinstall/tasks/dhclient-hooks-undo.yml b/roles/kubernetes/preinstall/tasks/dhclient-hooks-undo.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b62956929160f1b45b059c916c13091c214c051f
--- /dev/null
+++ b/roles/kubernetes/preinstall/tasks/dhclient-hooks-undo.yml
@@ -0,0 +1,22 @@
+---
+
+# These tasks will undo changes done by kargo in the past if needed (e.g. when upgrading from kargo 2.0.x
+# or when changing resolvconf_mode)
+
+- name: Remove kargo specific config from dhclient config
+  blockinfile:
+    dest: "{{dhclientconffile}}"
+    state: absent
+    backup: yes
+    follow: yes
+    marker: "# Ansible entries {mark}"
+  notify: Preinstall | restart network
+
+- name: Remove kargo specific dhclient hook
+  file: path="{{ dhclienthookfile }}" state=absent
+  notify: Preinstall | restart network
+  when: ansible_os_family != "RedHat"
+
+# We need to make sure the network is restarted early enough so that docker can later pick up the correct system
+# nameservers and search domains
+- meta: flush_handlers
diff --git a/roles/kubernetes/preinstall/tasks/main.yml b/roles/kubernetes/preinstall/tasks/main.yml
index a5a706da4821701a4c2705f6ac58e743337fa345..c9c034d4f07c7918db8bc32fc8ce31e6a87da229 100644
--- a/roles/kubernetes/preinstall/tasks/main.yml
+++ b/roles/kubernetes/preinstall/tasks/main.yml
@@ -175,6 +175,14 @@
   when: dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'
   tags: [bootstrap-os, resolvconf]
 
+- include: dhclient-hooks.yml
+  when: dns_mode != 'none' and resolvconf_mode == 'host_resolvconf' and not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
+  tags: [bootstrap-os, resolvconf]
+
+- include: dhclient-hooks-undo.yml
+  when: dns_mode != 'none' and resolvconf_mode != 'host_resolvconf' and not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
+  tags: [bootstrap-os, resolvconf]
+
 - name: Check if we are running inside a Azure VM
   stat: path=/var/lib/waagent/
   register: azure_check
diff --git a/roles/kubernetes/preinstall/tasks/resolvconf.yml b/roles/kubernetes/preinstall/tasks/resolvconf.yml
index c75f1dd86712564876b85f324a672c81e92baa7c..55edd0ca740763c941199c3717b86e6363c29e23 100644
--- a/roles/kubernetes/preinstall/tasks/resolvconf.yml
+++ b/roles/kubernetes/preinstall/tasks/resolvconf.yml
@@ -58,7 +58,3 @@
     mode: 0644
   notify: Preinstall | update resolvconf for Container Linux by CoreOS
   when: ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
-
-- include: dhclient-hooks.yml
-  when: not ansible_os_family in ["CoreOS", "Container Linux by CoreOS"]
-  tags: [bootstrap-os, resolvconf]