<p>I am running a one-node Kubernetes cluster in a VM for development and testing purposes. I used Rancher Kubernetes Engine (RKE, Kubernetes version 1.18) to deploy it and MetalLB to enable the LoadBalancer service type. Traefik is version 2.2, deployed via the official Helm chart (<a href="https://github.com/containous/traefik-helm-chart" rel="nofollow noreferrer">https://github.com/containous/traefik-helm-chart</a>). I have a few dummy containers deployed to test the setup (<a href="https://hub.docker.com/r/errm/cheese" rel="nofollow noreferrer">https://hub.docker.com/r/errm/cheese</a>).</p>
<p>I can access the Traefik dashboard just fine through the nodes IP (-&gt; MetalLB seems to work). It registers the services and routes for the test containers. Everything is looking fine but when I try to access the test containers in my browser I get a 502 Bad Gateway error.</p>
<p>Some probing showed that there seems to be an issue with outbound traffic from the pods. When I SSH into the node I can reach all pods by their service or pod IP. DNS from node to pod works as well. However, if I start an interactive busybox pod I can't reach any other pod or host from there. When I <code>wget</code> to any other container (all in the default namespace) I only get <code>wget: can't connect to remote host (10.42.0.7): No route to host.</code> The same is true for servers on the internet.</p>
<p>I have not installed any network policies and there are none installed by default that I am aware of.</p>
<p>I have also gone through this: <a href="https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service" rel="nofollow noreferrer">https://kubernetes.io/docs/tasks/debug-application-cluster/debug-service</a></p>
<p>Everything in the guide is working fine, except that the pods don't seem to have any network connectivity whatsoever.</p>
<p>My RKE config is standard, except that I turned off the standard Nginx ingress and enabled etcd encryption-at-rest.</p>
<p>Any ideas?</p>

MadMonkey
<p>Maybe just double check that your node's ip forwarding is turned on: <code>sysctl net.ipv4.ip_forward</code></p>
<p>If for some reason it doesn't return:
<code>net.ipv4.ip_forward = 1</code></p>
<p>Then you can set it with:
<code>sudo sysctl -w net.ipv4.ip_forward=1</code></p>
<p>And to make it permanent:</p>
<ul>
<li>edit <code>/etc/sysctl.conf</code></li>
<li>add or uncomment <code>net.ipv4.ip_forward = 1</code></li>
<li>and reload via <code>sysctl -p /etc/sysctl.conf</code></li>
</ul>
