<p>Hey it's been quite days struggling to make the sample book app running. I am new to istio and trying to get understand it. I followed this <a href="https://www.docker.com/blog/getting-started-with-istio-using-docker-desktop/" rel="nofollow noreferrer">demo</a> of an other way of setting up the bookinfo. I am using minikube in a virtualbox machine with docker as a driver. I set metalLB as a loadBalancer for <strong>ingress-gateway</strong>, here is the configmap i used for metalLB :</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: custom-ip-space
      protocol: layer2
      addresses:
      - 192.168.49.2/28
</code></pre>
<p>the <code>192.168.49.2</code> is the result of the command: <code>minikube ip</code></p>
<p>The ingressgateway yaml file:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: bookinfo-gateway
spec:
  selector:
    istio: ingressgateway # use istio default controller
  servers:
    - port:
        number: 80
        name: http
        protocol: HTTP
      hosts:
        - &quot;*&quot;
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: bookinfo
spec:
  hosts:
    - &quot;*&quot;
  gateways:
    - bookinfo-gateway
  http:
    - route:
        - destination:
            host: productpage
            port:
              number: 9080
</code></pre>
<p>and the output command of <code>kubectl get svc -n istio-system</code>:</p>
<pre><code>
NAME                     TYPE           CLUSTER-IP       EXTERNAL-IP    PORT(S)                                                                                                                                      AGE
grafana                  ClusterIP      10.111.105.179   &lt;none&gt;         3000/TCP                                                                                                                                     34m
istio-citadel            ClusterIP      10.100.38.218    &lt;none&gt;         8060/TCP,15014/TCP                                                                                                                           34m
istio-egressgateway      ClusterIP      10.101.66.207    &lt;none&gt;         80/TCP,443/TCP,15443/TCP                                                                                                                     34m
istio-galley             ClusterIP      10.103.112.155   &lt;none&gt;         443/TCP,15014/TCP,9901/TCP                                                                                                                   34m
istio-ingressgateway     LoadBalancer   10.97.23.39      192.168.49.0   15020:32717/TCP,80:31380/TCP,443:31390/TCP,31400:31400/TCP,15029:32199/TCP,15030:30010/TCP,15031:30189/TCP,15032:31134/TCP,15443:30748/TCP   34m
istio-pilot              ClusterIP      10.108.133.31    &lt;none&gt;         15010/TCP,15011/TCP,8080/TCP,15014/TCP                                                                                                       34m
istio-policy             ClusterIP      10.100.74.207    &lt;none&gt;         9091/TCP,15004/TCP,15014/TCP                                                                                                                 34m
istio-sidecar-injector   ClusterIP      10.97.224.99     &lt;none&gt;         443/TCP,15014/TCP                                                                                                                            34m
istio-telemetry          ClusterIP      10.101.165.139   &lt;none&gt;         9091/TCP,15004/TCP,15014/TCP,42422/TCP                                                                                                       34m
jaeger-agent             ClusterIP      None             &lt;none&gt;         5775/UDP,6831/UDP,6832/UDP                                                                                                                   34m
jaeger-collector         ClusterIP      10.111.188.83    &lt;none&gt;         14267/TCP,14268/TCP,14250/TCP                                                                                                                34m
jaeger-query             ClusterIP      10.103.148.144   &lt;none&gt;         16686/TCP                                                                                                                                    34m
kiali                    ClusterIP      10.111.57.222    &lt;none&gt;         20001/TCP                                                                                                                                    34m
prometheus               ClusterIP      10.107.204.95    &lt;none&gt;         9090/TCP                                                                                                                                     34m
tracing                  ClusterIP      10.104.88.173    &lt;none&gt;         80/TCP                                                                                                                                       34m
zipkin                   ClusterIP      10.111.162.93    &lt;none&gt;         9411/TCP                                                                                                                                     34m
</code></pre>
<p>and when trying to curl <code>192.168.49.0:80/productpage</code> I am getting :</p>
<pre><code>*   Trying 192.168.49.0...
* TCP_NODELAY set
* Immediate connect fail for 192.168.49.0: Network is unreachable
* Closing connection 0
curl: (7) Couldn't connect to server
myhost@k8s:~$ curl 192.168.49.0:80/productpage
curl: (7) Couldn't connect to server
</code></pre>
<p>and before setting up the metalLB, I was getting connection refused!</p>
<p>Any solution for this please ? as it's been 5 days struggling to fix it.</p>
<p>I followed the steps <a href="https://istio.io/latest/docs/tasks/traffic-management/ingress/ingress-control/#determining-the-ingress-ip-and-ports" rel="nofollow noreferrer">here</a> and all steps are ok!</p>

marOne
<p>In my opinion, this is a problem with the <code>MetalLB</code> configuration.</p>
<p>You are trying to give <code>MetalLB</code> control over IPs from the <code>192.168.49.2/28</code> network.<br />
We can calculate for <code>192.168.49.2/28</code> network: <strong>HostMin</strong>=<code>192.168.49.1</code> and <strong>HostMax</strong>=<code>192.168.49.14</code>.</p>
<p>As we can see, your <code>istio-ingressgateway</code> LoadBalancer Service is assigned the address <code>192.168.49.0</code> and I think that is the cause of the problem.</p>
<p>I recommend changing from <code>192.168.49.2/28</code> to a range, such as <code>192.168.49.10-192.168.49.20</code>.</p>
<hr />
<p>I've created an example to illustrate you how your configuration can be changed.</p>
<p>As you can see, at the beginning I had the configuration exactly like you (I also couldn't connect to the server using the <code>curl</code> command):</p>
<pre><code>$ kubectl get svc -n istio-system istio-ingressgateway
NAME                   TYPE           CLUSTER-IP     EXTERNAL-IP                                                                                                                                       
istio-ingressgateway   LoadBalancer   10.109.75.19   192.168.49.0    


$ curl 192.168.49.0:80/productpage
curl: (7) Couldn't connect to server
</code></pre>
<p>First, I modified the <code>config</code> <code>ConfigMap</code>:<br />
<strong>NOTE:</strong> I changed <code>192.168.49.2/28</code> to <code>192.168.49.10-192.168.49.20</code></p>
<pre><code>$ kubectl edit cm config -n metallb-system 
</code></pre>
<p>Then I restarted all the controller and speaker <code>Pods</code> to force <code>MetalLB</code> to use new config (see: <a href="https://github.com/metallb/metallb/issues/348#issuecomment-442218138" rel="nofollow noreferrer">Metallb ConfigMap update</a>).</p>
<pre><code>$ kubectl delete pod -n metallb-system --all      
pod &quot;controller-65db86ddc6-gf49h&quot; deleted
pod &quot;speaker-7l66v&quot; deleted
</code></pre>
<p>After some time, we should see a new <code>EXTERNAL-IP</code> assigned to the <code>istio-ingressgateway</code> <code>Service</code>:</p>
<pre><code>kubectl get svc -n istio-system istio-ingressgateway
NAME                   TYPE           CLUSTER-IP       EXTERNAL-IP                                                                                                                                         AGE
istio-ingressgateway   LoadBalancer   10.106.170.227   192.168.49.10  
</code></pre>
<p>Finally, we can check if it works as expected:</p>
<pre><code>$ curl 192.168.49.10:80/productpage                   
&lt;!DOCTYPE html&gt;
&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Simple Bookstore App&lt;/title&gt;
...
</code></pre>
