<p>I want to access a PostgreSQL component deployed in Kubernetes on GCP from the internet.</p>
<p>I wrote Pulumi code for a service with an external name.
The service looks like this:</p>
<pre><code>import * as k8s from &quot;@pulumi/kubernetes&quot;;
import {clusterProvider} from './cluster'
export const postgresService = new k8s.core.v1.Service('postgres-service', {
               metadata: {name: 'postgres'},
               spec: { type: 'ExternalName',
                       externalName: &quot;dev.postgresql.steinko.org&quot;,
                       ports: [ {port: 5432 }] ,
                       selector: { app:'postgres'}, 
                     }
           },
          { provider: clusterProvider}
)
</code></pre>
<p>When I click on the endpoint <code>dev.postgresql.steinko.org:5432</code> in the service window in GCP I get the error message:</p>
<pre><code>This site can’t be reachedCheck if there is a typo in dev.postgresql.steinko.org.
DNS_PROBE_FINISHED_NXDOMAIN
</code></pre>
<p><strong>Questions:</strong></p>
<ol>
<li><p>What must I do to get access to <code>dev.postgresql.steinko.org</code> so that I can get access to database on my computer?</p>
</li>
<li><p>Is there another way I can get access to the database ?</p>
</li>
</ol>

stein korsveien
<p>A Service of type <code>ExternalName</code> will not be useful. Its main purpose is to present as native cluster services, <strong>services that are hosted externally</strong>. For example, with an <code>ExternalName</code>, you can expose an AWS service as a regular service hosted on GKE. See
<a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/network/service-external-name.md" rel="nofollow noreferrer">https://github.com/kubernetes/community/blob/master/contributors/design-proposals/network/service-external-name.md</a></p>
<p>You can create a <code>LoadBalancer</code> service instead. GCP will then create an <code>External LoadBalancer</code> to expose your service to the internet: see <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/exposing-apps#creating_a_service_of_type_loadbalancer" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/exposing-apps#creating_a_service_of_type_loadbalancer</a></p>
