<p>I have a problem with accessible my service from outside.
First of all, here is my conf yaml files:</p>

<p><strong>nginx-pod.yaml</strong></p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: development
spec:
  selector:
    matchLabels:
      app: my-nginx
  replicas: 2
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      containers:
      - name: my-nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
</code></pre>

<p><strong>nginx-service.yaml</strong></p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: nginx-service
  namespace: development
spec:
  type: LoadBalancer
  selector:
    app: my-nginx
  ports:
  - name: http
    port: 80
    targetPort: 80
    protocol: TCP
</code></pre>

<p><strong>metallb-config.yaml</strong></p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    - name: default
      protocol: layer2
      addresses:
      - 51.15.41.227-51.15.41.227
</code></pre>

<p>Then i have created the cluster. Command <code>kubectl get all -o wide</code> prints:</p>

<pre>
NAME                            READY   STATUS    RESTARTS   AGE   IP            NODE         NOMINATED NODE
pod/my-nginx-5796dcf6c4-rxl6k   1/1     Running   1          20h   10.244.0.16   scw-7d6c86   
pod/my-nginx-5796dcf6c4-zf7vd   1/1     Running   0          20h   10.244.1.4    scw-7a7908   

NAME                    TYPE           CLUSTER-IP      EXTERNAL-IP    PORT(S)        AGE   SELECTOR
service/nginx-service   LoadBalancer   10.100.63.177   51.15.41.227   80:30883/TCP   54m   app=my-nginx

NAME                       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE   CONTAINERS   IMAGES        SELECTOR
deployment.apps/my-nginx   2         2         2            2           20h   my-nginx     nginx:1.7.9   app=my-nginx

NAME                                  DESIRED   CURRENT   READY   AGE   CONTAINERS   IMAGES        SELECTOR
replicaset.apps/my-nginx-5796dcf6c4   2         2         2       20h   my-nginx     nginx:1.7.9   app=my-nginx,pod-template-hash=5796dcf6c4
</pre>

<p>Everythink is fine, also <code>kubectl describe service/nginx-service</code> prints:</p>

<pre><code>Name:                     nginx-service
Namespace:                development
Labels:                   
Annotations:              
Selector:                 app=my-nginx
Type:                     LoadBalancer
IP:                       10.100.63.177
LoadBalancer Ingress:     51.15.41.227
Port:                     http  80/TCP
TargetPort:               80/TCP
NodePort:                 http  30883/TCP
Endpoints:                10.244.0.16:80,10.244.1.4:80
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type    Reason       Age   From                Message
  ----    ------       ----  ----                -------
  Normal  IPAllocated  56m   metallb-controller  Assigned IP "51.15.41.227"
</code></pre>

<p>Curl command inside master server <code>curl 51.15.41.227</code> prints <code>Welcome to nginx blablabla</code>. Next i tried to open from another network, it doesn't work, however i added node port it works curl 51.15.41.227:30883. All this i did on a bare-metal. I expected to happen <code>curl 51.15.41.227</code> from external host should reach result.
What did i do wrong?</p>

Dmytro Ivanov
<p>Definitely it will work with <a href="http://51.15.41.227" rel="nofollow noreferrer">http://51.15.41.227</a> or 51.15.41.227:80. You can upvote answer by pressing up button.</p>
