<p>I have created a Kubernetes Service with type ExternalName, I understand this service act as a proxy and redirect the request to the external service sitting outside the cluster. I am able to create the service but not able to curl it i.e I get 500 error.
I wanna understand how this ExternalName Kubernetes service work.</p>

Kunal Malhotra
<p>Services with type <code>ExternalName</code> work as other regular services, but when you want to access to that service name, instead of returning cluster-ip of this service, it returns CNAME record with value that mentioned in <code>externalName:</code> parameter of service.</p>

<p>As example mentioned in <a href="https://kubernetes.io/docs/concepts/services-networking/service/#externalname" rel="noreferrer">Kubernetes Documentation</a>:</p>

<pre><code>kind: Service
apiVersion: v1
metadata:
  name: my-service
spec:
  type: ExternalName
  externalName: my.database.example.com
</code></pre>

<p>When you want to do <code>curl -v http://my-service</code> or <code>curl -v http://my-service.default.svc.cluster.local</code> according your namespace(in this example it is default), it will redirect you at the DNS level to <code>http://my.database.example.com</code></p>

<p>I hope it was useful</p>
