title: How can I proxy forward traffic using kubernetes
body: <p>Does anyone know how could I proxy forward database traffic from localhost to an AWS database using kubernetes. Networkingwise, the pod has access to the db and it looks like below  </p>
  
  <pre><code>+-----------+    +--------+     +-----------+
  |           |    |        |     |           |
  | Localhost +--&gt; |  Pod   +---&gt; |  AWS RDS  |
  |           |    |        |     |           |
  +-----------+    +--------+     +-----------+
  </code></pre>
  
  <p>If I had a normal ubuntu box instead of a pod I would have done something like this</p>
  
  <pre><code>ssh -L 5432:test.rds.amazonaws.com:5432 name-of-host
  </code></pre>
  
  <p>I tried to run the command below but that only proxy port 5432 to the pod not to RDS</p>
  
  <pre><code>kubectl port-forward pod-name 5432:5432
  </code></pre>
  
  <p>Anyone knows how to tackle this issue?</p>