<p>I have a website that needs to be proxied through my web app.<br />
Traditionally we've accomplished it via apache proxy with proxy directives.<br />
The proxy also rewrites some of the headers and adds a couple of new ones.</p>
<p>Now the app has moved to OpenShift (Kubernetes) and I'm trying to avoid deploying another pod with apache.</p>
<p>Can I perform this header rewriting and proxying via K8 ingress? or router?</p>
<p>I've tried this approach, but it didn't work.</p>
<p>I also don't know how to get OpenShift Ingress logs, nothing seems to happen in there.</p>
<p>I tried using an external name, but it doesn't work:</p>
<pre><code>kind: Service
metadata:
    name: es3
spec:
    externalName: google.com
    type: ExternalName
---
kind: Route
apiVersion: route.openshift.io/v1
spec:
  host: host.my-cluster-url.net
  to:
    kind: Service
    name: es3
  port:
    targetPort: es3
</code></pre>
<p>I also tried using Endpoints , same result</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: mysvc
spec:
  ports:
  - name: app
    port: 80
    protocol: TCP
    targetPort: 80
  clusterIP: None
  type: ClusterIP
---
apiVersion: v1
kind: Endpoints
metadata:
  name: mysvc
subsets:
- addresses:
  - ip:  my.ip.address
  ports:
  - name: app
    port: 80
    protocol: TCP
</code></pre>

JavaHead
<p>you want to proxy non kubernetes service, right? if yes, use end point and create service from end point, I have used this with kubernetes will work with openshift too my wild guess</p>
<p><a href="https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/endpoint-slices/</a></p>
