<p>I have been playing with Digital Ocean's new managed Kubernetes service. I have created a new cluster using Digital Ocean's dashboard and, seemingly, successfully deployed my yaml file (attached). </p>

<p>running in context <code>kubectl get services</code></p>

<p><code>NAME            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
api-svc          NodePort   XX.XXX.XXX.XXX   &lt;none&gt;        8080:30000/TCP   2h
kubernetes       ClusterIP  XX.XXX.X.X       &lt;none&gt;        443/TCP          2h</code></p>

<p>My question is, <strong>how do I go exposing my service without a load balancer?</strong></p>

<p>I have been able to do this locally using minikube. To get the cluster IP I run <code>minikube ip</code> and use port number <code>30000</code>, as specified in my nodePort config, to reach the <code>api-svc</code> service. </p>

<p>From what I understand, Digital Ocean's managed service abstracts the master node away. So where would I find the public IP address to access my cluster?</p>

<p>Thank you in advance!</p>

<p><strong>my yaml file for reference</strong></p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: regcred
data:
  .dockerconfigjson: &lt;my base 64 key&gt;
type: kubernetes.io/dockerconfigjson
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: api-deployment
  labels:
    app: api-deployment
spec:
  replicas: 1
  strategy: {}
  template:
    metadata:
      labels:
        app: api
 spec:
   containers:
   - name: api
     image: &lt;my-dockerhub-user&gt;/api:latest
     ports:
         - containerPort: 8080
   imagePullSecrets:
   - name: regcred
---
apiVersion: v1
kind: Service
metadata:
  name: api-svc
spec:
  type: NodePort
  ports:
  - port: 8080
    targetPort: 8080
    nodePort: 30000
    protocol: TCP
  selector:
    app: api
  type: NodePort
</code></pre>

<p>Slightly more detailed answer: DigitalOcean manages firewall rules for your NodePort services automatically, so once you expose the service, the NodePort is automatically open to public traffic from all worker nodes in your cluster. See <a href="https://docs.digitalocean.com/products/kubernetes/resources/managed/#worker-node-firewalls" rel="nofollow noreferrer">docs</a></p>
<p>To find the public IP of any of your worker nodes, execute the following <code>doctl</code> commands:</p>
<pre class="lang-sh prettyprint-override"><code># Get the first worker node from the first node-pool of your cluster
NODE_NAME=$(doctl kubernetes cluster node-pool get &lt;cluster-name&gt; &lt;pool-name&gt; -o json | jq -r '.[0].nodes[0].name')
WORKER_NODE_IP=$(doctl compute droplet get $NODE_NAME --template '{{.PublicIPv4}}')
</code></pre>
