<p>I'm new to Kubernetes. I successfully created a deployment with 2 replicas of my Angular frontend application, but when I expose it with a service and try to access the service with 'minikube service service-name', the browser can't show me the application. </p>

<p>This is my docker file</p>

<pre><code>FROM registry.gitlab.informatica.aci.it/ccsc/images/nodejs/10_15

LABEL maintainer="d.vaccaro@informatica.aci.it" name="assistenza-fo" version="v1.0.0" license=""

WORKDIR /usr/src/app

ARG PRODUCTION_MODE="false"

ENV NODE_ENV='development'
ENV HTTP_PORT=4200

COPY package*.json ./

RUN if [ "${PRODUCTION_MODE}" = "true" ] || [ "${PRODUCTION_MODE}" = "1" ]; then \
    echo "Build di produzione"; \
    npm ci --production ; \
    else \
    echo "Build di sviluppo"; \
    npm ci ; \
fi

RUN npm audit fix

RUN npm install -g @angular/cli

COPY dockerize /usr/local/bin

RUN chmod +x /usr/local/bin/dockerize

COPY . .

EXPOSE 4200

CMD ng serve --host 0.0.0.0
</code></pre>

<p>pod description</p>

<pre><code>Name:           assistenza-fo-674f85c547-bzf8g
Namespace:      default
Priority:       0
Node:           minikube/172.17.0.2
Start Time:     Sun, 19 Apr 2020 12:41:06 +0200
Labels:         pod-template-hash=674f85c547
                run=assistenza-fo
Annotations:    &lt;none&gt;
Status:         Running
IP:             172.18.0.6
Controlled By:  ReplicaSet/assistenza-fo-674f85c547
Containers:
  assistenza-fo:
    Container ID:   docker://ef2bfb66d22dea56b2dc0e49e875376bf1edff369274015445806451582703a0
    Image:          registry.gitlab.informatica.aci.it/apra/sta-r/assistenza/assistenza-fo:latest
    Image ID:       docker-pullable://registry.gitlab.informatica.aci.it/apra/sta-r/assistenza/assistenza-fo@sha256:8d02a3e69d6798c1ac88815ef785e05aba6e394eb21f806bbc25fb761cca5a98
    Port:           4200/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Sun, 19 Apr 2020 12:41:08 +0200
    Ready:          True
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-zdrwg (ro)
Conditions:
  Type              Status
  Initialized       True
  Ready             True
  ContainersReady   True
  PodScheduled      True
Volumes:
  default-token-zdrwg:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-zdrwg
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:          &lt;none&gt;
</code></pre>

<p>my deployment description</p>

<pre><code>Name:                   assistenza-fo
Namespace:              default
CreationTimestamp:      Sun, 19 Apr 2020 12:41:06 +0200
Labels:                 run=assistenza-fo
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               run=assistenza-fo
Replicas:               2 desired | 2 updated | 2 total | 2 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  run=assistenza-fo
  Containers:
   assistenza-fo:
    Image:        registry.gitlab.informatica.aci.it/apra/sta-r/assistenza/assistenza-fo:latest
    Port:         4200/TCP
    Host Port:    0/TCP
    Environment:  &lt;none&gt;
    Mounts:       &lt;none&gt;
  Volumes:        &lt;none&gt;
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  &lt;none&gt;
NewReplicaSet:   assistenza-fo-674f85c547 (2/2 replicas created)
Events:          &lt;none&gt;
</code></pre>

<p>and my service description</p>

<pre><code>Name:                     assistenza-fo
Namespace:                default
Labels:                   run=assistenza-fo
Annotations:              &lt;none&gt;
Selector:                 run=assistenza-fo
Type:                     LoadBalancer
IP:                       10.97.3.206
Port:                     &lt;unset&gt;  4200/TCP
TargetPort:               4200/TCP
NodePort:                 &lt;unset&gt;  30375/TCP
Endpoints:                172.18.0.6:4200,172.18.0.7:4200
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>

<p>When i run the command</p>

<pre><code>minikube service assistenza-fo
</code></pre>

<p>I get the following output: </p>

<pre><code>|-----------|---------------|-------------|-------------------------|
| NAMESPACE |     NAME      | TARGET PORT |           URL           |
|-----------|---------------|-------------|-------------------------|
| default   | assistenza-fo |        4200 | http://172.17.0.2:30375 |
|-----------|---------------|-------------|-------------------------|
* Opening service default/assistenza-fo in default browser...
</code></pre>

<p>but Chrome prints out: "unable to reach the site" for timeout.</p>

<p>Thank you</p>

<p><strong>EDIT</strong></p>

<p>I create again the service, this time as a NodePort service. Still not working. This is the service description:</p>

<pre><code>Name:                     assistenza-fo
Namespace:                default
Labels:                   run=assistenza-fo
Annotations:              &lt;none&gt;
Selector:                 run=assistenza-fo
Type:                     NodePort
IP:                       10.107.46.43
Port:                     &lt;unset&gt;  4200/TCP
TargetPort:               4200/TCP
NodePort:                 &lt;unset&gt;  30649/TCP
Endpoints:                172.18.0.7:4200,172.18.0.8:4200
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;
</code></pre>

<p>I was able to reproduce your issue.</p>

<p>It's actually a bug on latest version of Minikube for Windows running Docker Driver: <code>--driver=docker</code></p>

<ul>
<li>You can see it here: <a href="https://github.com/kubernetes/minikube/issues/7644" rel="noreferrer">Issue - minikube service not working with Docker driver on Windows 10 Pro #7644</a></li>
<li>it was patched with the merge: <a href="https://github.com/kubernetes/minikube/pull/7739" rel="noreferrer">Pull - docker driver: Add Service &amp; Tunnel features to windows</a></li>
<li>it is available now on <a href="https://github.com/kubernetes/minikube/releases/tag/v1.10.0-beta.0" rel="noreferrer">Minikube v1.10.0-beta.0</a></li>
</ul>

<p>In order to make it work, download the beta version from the website:</p>

<ul>
<li><p><a href="https://github.com/kubernetes/minikube/releases/download/v1.10.0-beta.0/minikube-windows-amd64.exe" rel="noreferrer">https://github.com/kubernetes/minikube/releases/download/v1.10.0-beta.0/minikube-windows-amd64.exe</a></p></li>
<li><p>move it to your working folder and rename it to <code>minikube.exe</code></p></li>
</ul>

<pre><code>C:\Kubernetes&gt;rename minikube-windows-amd64.exe minikube.exe

C:\Kubernetes&gt;dir
22/04/2020  21:10    &lt;DIR&gt;          .
22/04/2020  21:10    &lt;DIR&gt;          ..
22/04/2020  21:04        55.480.832 minikube.exe
22/04/2020  20:05               489 nginx.yaml
               2 File(s)     55.481.321 bytes
</code></pre>

<ul>
<li>If you haven't yet, <code>stop</code> and <code>uninstall</code> the older version, then start Minikube with the new binary:</li>
</ul>

<pre><code>C:\Kubernetes&gt;minikube.exe start --driver=docker
* minikube v1.10.0-beta.0 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Using the docker driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Pulling base image ...
* Restarting existing docker container for "minikube" ...
* Preparing Kubernetes v1.18.0 on Docker 19.03.2 ...
  - kubeadm.pod-network-cidr=10.244.0.0/16
* Enabled addons: dashboard, default-storageclass, storage-provisioner
* Done! kubectl is now configured to use "minikube"

C:\Kubernetes&gt;kubectl get all
NAME                        READY   STATUS    RESTARTS   AGE
pod/nginx-76df748b9-t6q59   1/1     Running   1          78m

NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)        AGE
service/kubernetes   ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP        85m
service/nginx-svc    NodePort    10.100.212.15   &lt;none&gt;        80:31027/TCP   78m

NAME                    READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nginx   1/1     1            1           78m

NAME                              DESIRED   CURRENT   READY   AGE
replicaset.apps/nginx-76df748b9   1         1         1       78m
</code></pre>

<ul>
<li>Minikube is now running on version v1.10.0-beta.0, now you can run the service as intended (and note the command will be unavailable because it will be tunneling the connection:</li>
</ul>

<p><a href="https://i.stack.imgur.com/wlbDG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/wlbDG.png" alt="enter image description here"></a></p>

<ul>
<li>The browser will open automatically and your service will be available:</li>
</ul>

<p><a href="https://i.stack.imgur.com/Zx0fc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Zx0fc.png" alt="enter image description here"></a></p>

<p>If you have any doubts let me know in the comments.</p>
