Fix the command for kube-proxy cleanup (#5671)

This commit is contained in:
Qingkun Li 2020-03-13 05:32:39 -07:00 committed by GitHub
parent dc00b96f47
commit 43020bd064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 %}