<p>I am new to k8 and I am trying to understand the difference between the two services.
Service A:</p>
<pre><code>test1  ClusterIP   ##.##.##    &lt;none&gt;        8080/TCP   187d
</code></pre>
<p>vs</p>
<pre><code>test2  LoadBalancer   ##.##.##    ww.blah.com   2888:31218/TCP,8080:30012/TCP   20d
</code></pre>
<ol>
<li>I understand that one can be accessed through a LoadBalancer (<code>test2</code>) and the other is through a ClusterIP(<code>test1</code>).</li>
<li>For application <code>test2</code> I want to expose the port 8080 similar to <code>test1</code></li>
</ol>
<p>But I am not understanding what  <code>2888:31218/TCP,8080:30012/TCP</code> means.
Please can someone explain it to me how can I do something similar for <code>test2</code> as it is for <code>test1</code> without exposing it via a <code>ClusterIP</code></p>

Shivangi Singh
<p>Answering to your questions in the same order</p>
<ol>
<li>test1 service is defined as ClusterIP, which means that the service is accessible within the kubernetes cluster only.</li>
<li>test2 is defined as service type LoadBalancer. It can be accessed externally over internet. Moreover, it has two ports listening on 2888 and 8080. port 2888 is bound to NodePort 31218 and 8080 is bound to 30012 NodePort. The service can also be accessed using the Hostname:NodePort combination using any of the cluster member.</li>
</ol>
