I am facing an issue with a k8s Service of type ExternalName with the following config:
apiVersion: v1
kind: Service
metadata:
name: test
namespace: kong
spec:
type: ExternalName
externalName: httpbin-xxxxxxxxxx-ew.a.run.app (x is redacting the real values for security)
ports:
- protocol: TCP
name: http
port: 80
- protocol: TCP
name: https
port: 443
The Ingress yaml is the following
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test
namespace: kong
spec:
ingressClassName: kong
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: test
port:
number: 80
host:
When we make a request to the host defined in the Ingress spec, it seems as if the ExternalName service is making the request based on the the underlying IP for the domain httpbin-4i7xxxxxxx-ew.a.run.app, instead of using the domain as is. From what I have been able to test, if you call GCP Cloud Run by IP, it does not resolve and returns a 404, and that is the same behaviour we are seeing when we call our redacted host through the Ingress spec defined above. Is there any way to make kong use the domain as is, instead of its IP, when forwarding requests to the externalName?