<p>We are trying to create an ExternalName service for Kubernetes to hide URL linking to our Firebase:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: firebase
  namespace: devel
spec:
  type: ExternalName
  externalName: firebase-project-123456.firebaseio.com
</code></pre>

<p>The service is created correctly, and we can ping to <code>http://firebase</code>. However connecting to the firebase endpoint doesn't work:</p>

<pre><code>curl -v http://firebase/activity.json
&lt; HTTP/1.1 404 Not Found
&lt; Content-Type: text/html; charset=UTF-8
&lt; Referrer-Policy: no-referrer
</code></pre>

<p>One idea is that there is an issue with https (as the target service runs on https), however then we wouldn't probably get 404, but some other error. I have no idea what might be wrong on the way.</p>

Vojtěch
<p>You might be running into a virtual host issue. firebase-project-123456.firebaseio.com is a virtual host name which is then used to route your request to the correct backend. A Kubernetes external service is essentially a DNS CNAME, which forces a second DNS lookup for the actual host name.</p>

<p>See if this works for you:</p>

<pre><code>curl -v -H "Host: firebase-project-123456.firebaseio.com" http://firebase/activity.json
</code></pre>

<p>If it does, that's what you're running into. You might have to make a trivially simple service instead, which proxies your requests to the correct URL at firebase.</p>
