0

To expose some state-full set pods I used the following script:

microk8s.kubectl expose po mars-0 mars-1 mars-2 mars-3 mars-4 mars-5 mars-6 mars-7 mars-8 mars-9 --type LoadBalancer --port 31001,31002,31003,31004,31005,31006,31007,31008,31009

The above script assigns IPs that I can use to connect to the Pods ports, so the first assigned IP will connect to Pod named mars-0 on any of the specified ports and the second assigned IP will connect to Pod mars-1, This worked properly in microk8s version 1.23/stable however when using version 1.24/stable only the first pod named mars-0 will be accessible from any Metallb assigned IP.

geisterfurz007
  • 5,292
  • 5
  • 33
  • 54
  • The services generated using the script will be similar to: mars-0 LoadBalancer 10.152.183.218 192.168.1.50 31001:30895/TCP,31002:31542/TCP,31003:31931/TCP,31004:31004/TCP,31005:31920/TCP,31006:31938/TCP,31007:31764/TCP,31008:30320/TCP,31009:32322/TCP 5h24m – user8217890 Aug 26 '22 at 19:39
  • The second service is: mars-1 LoadBalancer 10.152.183.118 192.168.1.51 31001:31923/TCP,31002:31178/TCP,31003:32263/TCP,31004:30866/TCP,31005:31460/TCP,31006:31482/TCP,31007:30619/TCP,31008:30236/TCP,31009:32113/TCP 5h24m – user8217890 Aug 26 '22 at 19:44
  • so using IP 192.168.1.50 I can access the ports on mars-0 and 192.168.1.51 access ports on mars-1 – user8217890 Aug 26 '22 at 19:45
  • The problem was not in the expose script. I created the system using version 1,23 and all worked as expected then I refreshed it to version 1.24 and was still working then I killed mars-1 and the system restored it and all traffic that was supposed to go to it was now going to mars-0 looks like it is an issue in the yaml files in version 1.24 – user8217890 Aug 27 '22 at 09:04
  • same error in version 1.25 – user8217890 Aug 27 '22 at 09:39
  • In version 1.25 clearly it is a Metallb issue – user8217890 Aug 27 '22 at 11:20

0 Answers0