From 43020bd0645da17b59b993c21ee42ac2582dcc63 Mon Sep 17 00:00:00 2001 From: Qingkun Li Date: Fri, 13 Mar 2020 05:32:39 -0700 Subject: [PATCH] Fix the command for kube-proxy cleanup (#5671) --- roles/kubernetes/node/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/kubernetes/node/tasks/main.yml b/roles/kubernetes/node/tasks/main.yml index 70ea0090d..14bad2b8d 100644 --- a/roles/kubernetes/node/tasks/main.yml +++ b/roles/kubernetes/node/tasks/main.yml @@ -153,7 +153,7 @@ set_fact: kube_proxy_cleanup_command: >- {%- if container_manager in ['docker', 'crio'] %} - {{ docker_bin_dir }}/docker run --rm --privileged -v /lib/modules:{{ kube_proxy_image_repo }}:{{ kube_version }} --cleanup + {{ docker_bin_dir }}/docker run --rm --privileged -v /lib/modules:/lib/modules {{ kube_proxy_image_repo }}:{{ kube_version }} kube-proxy --cleanup {%- elif container_manager == "containerd" %} ctr run --rm --mount type=bind,src=/lib/modules,dst=/lib/modules,options=rbind:rw {{ kube_proxy_image_repo }}:{{ kube_version }} kube-proxy --cleanup {%- endif %}