loxilb-io / kube-loxilb

Implementation of kubernetes service load-balancer spec for loxilb
Apache License 2.0
85 stars 16 forks source link

Load balancer should be deleted when kubernetes service is deleted #58

Closed aerosouund closed 9 months ago

aerosouund commented 11 months ago

I created a k8s service with loadbalancer type and it got registered with loxilb as shown in the output of loxicmd get lb

|  EXTERNAL IP   | PORT  | PROTOCOL | MARK | SELECT |  MODE   | # OF ENDPOINTS | MONITOR |
|----------------|-------|----------|------|--------|---------|----------------|---------|
| 192.168.65.103 |  3000 | tcp      |    0 | rr     | fullnat |              7 | Off     |

If i delete the service the get lb command still shows it

I'm running loxilb from code as per this guide https://loxilb-io.github.io/loxilbdocs/run/

K8s engine: EKS 1.23 LoxiLB node: external, ubuntu 20.04 Kube-loxilb options:

      - '--loxiURL=http://192.168.65.103:11111'
      - '--setLBMode=2'
      - '--externalCIDR=192.168.65.103/32'
      - '--setRoles=0.0.0.0'
aerosouund commented 11 months ago

If this is an actual issue and not a misconfiguration from my side then i'd love to submit a PR that fixes it please

TrekkieCoder commented 11 months ago

When the service is deleted the corresponding rule in loxilb should be deleted . However not sure why it is not happening in your specific case. Will be happy to accept PR if you can pinpoint the issue in code.

You can find the kube-loxilb logs -

kubectl logs -n kube-system <kube-loxilb-pod-name>
aerosouund commented 11 months ago

Awesome, ill review it and submit a PR if i discover something

TrekkieCoder commented 9 months ago

Closing this as this has been validated to be working fine. If you face further issues, kindly reopen !!