title: Within a Kubernetes cluster catch outgoing requests from a Pod and redirect to a different target
body: <p>I have a cluster with 3 nodes. In each node i have a frontend application running in a Pod and backend application running in a separate Pod.
  I send data from the frontend application to the backend application, to do this i utilise the Cluster IP Service and k8 dns resource. 
  I also have a function in my frontend where i send data to a separate service unrelated to my k8s cluster. I send this data using a standard AJAX request to a url with a payload  i.e <a href="http://my-seperate-service-unrelated-tok8.com" rel="nofollow noreferrer">http://my-seperate-service-unrelated-tok8.com</a>.
  All of this works correctly and the cluster operates as i want. - i have this cluster deployed to GKE.   I now want to run this cluster local using minikube, which i have been able to do, however, when i am running locally i do not want to send data to my external service - instead i want to forward it to either a new Pod i will create or just not send it.</p>
  
  <p>  The problem here is i need a proxy to intercept outgoing network traffic, check if the outgoing request is the request i am looking for and if it is then redirect it. </p>
  
  <p>I understand each node running in a cluster has a kube-proxy service running within the node - which is used to forward traffic to the relevant services in the cluster.   I would like to either extend this service, or create a new proxy service where i can listen for outgoing traffic to a specific url and redirect it.   Is this possible to do in a k8 cluster? I assume there is a Service i can create to listen for all outgoing requests and redirect specific requests based on rules i set.   </p>
  
  <p>I wasn’t sure if k8 clusters have a Service already configured i can simply add to - that’s why i thought of the kube-proxy, would anyone be able to advice on this?  I wanted to add this proxy so i don’t have to change my code when its ran locally in minikube or deployed to GKE. </p>
  
  <p>  Any help is greatly appreciated. Thanks!</p>