<p>I have used the following configurations to deploy an app on minikube.</p>
<p><strong>Deployment</strong>:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: angular-app
spec:
  replicas: 2
  selector:
    matchLabels:
      run: angular-app
  template:
    metadata:
      labels:
        run: angular-app
    spec:
      containers:
      - name: angular-app
        image: nheidloff/angular-app
        ports:
        - containerPort: 80
        - containerPort: 443
    
</code></pre>
<p><strong>Service:</strong></p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: angular-app
  labels:
    run: angular-app
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http
</code></pre>
<p><strong>Service description:</strong></p>
<pre><code>Name:                     angular-app    
Namespace:                default        
Labels:                   run=angular-app
Annotations:              &lt;none&gt;
Selector:                 &lt;none&gt;
Type:                     NodePort       
IP Family Policy:         SingleStack    
IP Families:              IPv4
IP:                       10.102.174.98  
IPs:                      10.102.174.98
Port:                     http  80/TCP
TargetPort:               80/TCP
NodePort:                 http  31503/TCP
Endpoints:                172.17.0.3:80,172.17.0.4:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>
<p>When i try to access the endpoints, the links are not responding. However after using <code>minikube service angular-app</code>. Following showed up:</p>
<pre><code>|-----------|-------------|-------------|---------------------------|
| NAMESPACE |    NAME     | TARGET PORT |            URL            |
|-----------|-------------|-------------|---------------------------|
| default   | angular-app | http/80     | http://192.168.49.2:31503 |
|-----------|-------------|-------------|---------------------------|
🏃  Starting tunnel for service angular-app.
|-----------|-------------|-------------|------------------------|
| NAMESPACE |    NAME     | TARGET PORT |          URL           |
|-----------|-------------|-------------|------------------------|
| default   | angular-app |             | http://127.0.0.1:60611 |
|-----------|-------------|-------------|------------------------|
</code></pre>
<p>With this ip <code>http://127.0.0.1:60611</code> im able to access the app. What is the use of the endpoints given in the service description? How to access each replica? Say if i have 4 replicas, how do i access each one of them?</p>

<p>The answer from ~al-waleed-shihadeh is correct, but I want to give some additional info.</p>
<ul>
<li><p>You should be able to access the service via the NodePort, too, without needing the <code>minikube service</code> command: <a href="http://192.168.49.2:31503" rel="nofollow noreferrer">http://192.168.49.2:31503</a> . The port is assigned at random, but you can choose a fixed one in the range 30000-32767</p>
<pre><code>spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
    protocol: TCP
    name: http
    nodePort: 30080
</code></pre>
</li>
<li><p>If you want a 'normal' URL to access the service, you must add an Ingress that allow access to the service via a reverse proxy. It will route to one of your services' pods using load-balancing.</p>
</li>
<li><p>If you want fixed URL's to each of your pods separately, you could use a StatefulSet instead of a Deployment, and create 4 different services with selectors for angular-app-0 to angular-app-3, and then have 4 different ingresses as well.</p>
</li>
</ul>
