<p>I have k3s installed and created a testpod in new namespace. I want to know two things:</p>
<ol>
<li>How can I know how many gateways are open for egress calls/outgoing calls when I do <code>curl -v https://google.com</code> or  <code>curl -v https://github.com</code> from that testpod?</li>
<li>Then how can I block(or route traffic from) all these gateways so that the egress traffic goes via common gateway that I will create?</li>
</ol>

solveit
<p>If you want to test &amp; check the egress traffic</p>
<p>You can go inside the pod and try the <code>curl -v https://google.com</code> or else try <code>curl ip.me</code> which return you the Host IP from where request if getting called</p>
<p>In a normal scenario, <strong>Kubernetes</strong> uses the <code>Worker Node IP</code> as <code>Host IP</code> so you might see <strong>different IPs</strong> if your <strong>POD</strong> is running on different <strong>Node</strong>.</p>
<p><strong>Manging the single Egress:</strong></p>
<p>For managing the single <strong>Egress</strong> you can set up the <strong>NAT</strong> <strong>gateway</strong> which will manage all the outgoing traffic from <strong>worker nodes</strong> via a single point.</p>
<p><a href="https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html</a></p>
<p>If you are on GKE use this : <a href="https://registry.terraform.io/modules/GoogleCloudPlatform/nat-gateway/google/latest/examples/gke-nat-gateway" rel="nofollow noreferrer">https://registry.terraform.io/modules/GoogleCloudPlatform/nat-gateway/google/latest/examples/gke-nat-gateway</a></p>
<p>For egress gateway support in K3s there is open PR : <a href="https://github.com/k3s-io/k3s/issues/1509" rel="nofollow noreferrer">https://github.com/k3s-io/k3s/issues/1509</a></p>
