diff --git a/test/840_weave_kube_3_test.sh b/test/840_weave_kube_3_test.sh index adbc9d4c..48d57d56 100755 --- a/test/840_weave_kube_3_test.sh +++ b/test/840_weave_kube_3_test.sh @@ -5,6 +5,10 @@ tear_down_kubeadm() { for host in $HOSTS; do run_on $host "sudo kubeadm reset && sudo rm -r -f /opt/cni/bin/*weave*" + # Remove the rule to ensure that api-server is not accessible while kube-proxy + # is not ready. Otherwise, we have a race between "-j KUBE-FORWARD" and "-j WEAVE-NPC" + # which makes the NodePort isolation test case to fail. + run_on $host "sudo iptables -t nat -D PREROUTING -m comment --comment \"kubernetes service portals\" -j KUBE-SERVICES" || true done }