1

I'm using Metallb for a bare-metal kubernetes cluster.

I've modified the configmap as below,

apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    address-pools:
    #- name: default
      #protocol: layer2
      #addresses:
      #- 192.168.1.240-192.168.1.250
    - addresses:
      - <Public_IP_01>/32
      - <Public_IP_02>/32
      - <Public_IP_03>/32
      name: prod
      protocol: layer2

And however the right ip is assigned, it's not reachable at http://<Public_IP_01>, but it's reachable through http://<Public_IP_01>:31158. I feel like it's working as nodeport not the load balancer

k get svc -A
default       nginx-service   LoadBalancer   10.98.4.122      <Public_IP_01>     80:31158/TCP             7m3s

Any ideas how to enforce traffic on port 80.

Thanks,

Nurhun
  • 475
  • 1
  • 9
  • 21
  • 1
    It's minikube or kubeadm? How did you deploy `MetalLB`, Helm or YAML Manifests? Could you provide outputs of `kubectl describe service -n ` and `kubectl -n get endpoints ` – PjoterS Dec 08 '20 at 15:57
  • `k describe service odoo-srv -n odoo` `Name: odoo-srv` `Namespace: odoo` `Labels: name=odoo` `Annotations: metallb.universe.tf/address-pool: prod` `Selector: app=odoo,tier=frontend` `Type: ClusterIP` `IP: 10.111.164.114` `Port: 80/TCP` `TargetPort: 8069/TCP` `Endpoints: 10.244.1.193:8069` `Session Affinity: None` `Events: ` – Nurhun Jan 21 '21 at 18:19
  • `k -n odoo get endpoints odoo-srv NAME ENDPOINTS AGE odoo-srv 10.244.1.193:8069 11m` – Nurhun Jan 21 '21 at 18:22
  • `NAMESPACE NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE` `ingress-nginx service/ingress-nginx-controller NodePort 10.101.224.193 80:32196/TCP,443:31575/TCP 44d` `ingress-nginx service/ingress-nginx-controller-admission ClusterIP 10.98.201.38 443/TCP 44d` `odoo service/odoo-srv ClusterIP 10.111.164.114 80/TCP 8m39s` – Nurhun Jan 21 '21 at 18:23
  • sorry about the format – Nurhun Jan 21 '21 at 18:25

0 Answers0