Skip to content

Commit 54f1f7d

Browse files
authored
fix: run iptables as sudo on microk8s stop (#5021) (#5033)
(cherry picked from commit 2133765)
1 parent 3a298b0 commit 54f1f7d

File tree

1 file changed

+1
-1
lines changed
  • microk8s-resources/actions/common

1 file changed

+1
-1
lines changed

microk8s-resources/actions/common/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ remove_all_containers() {
991991
"${SNAP}/microk8s-ctr.wrapper" container delete $container &>/dev/null || true
992992
done
993993

994-
iptables-legacy -t nat -F CNI-HOSTPORT-DNAT || true
994+
run_with_sudo iptables-legacy -t nat -F CNI-HOSTPORT-DNAT &>/dev/null || true
995995
}
996996

997997
get_container_shim_pids() {

0 commit comments

Comments
 (0)