- If you have multiple pods providing a service it can be difficult or impossible for clients to use them all effectively
- You cannot predict the port hosting your application and that port will change every time you deploy. For example, instead of getting port 443 for each application you'd get a random port assigned between 30,000 and 32,767
I've documented my steps for reference but I encourage you to review the official documentation [https://metallb.universe.tf/installation/]. It's well written and about as straight forward as you can get.
MetalLB Install
Not much to say here. Run the official install, be happy.kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.8.0/manifests/metallb.yaml
MetalLB Configuration
I've opted for the simpler and universal L2 load balancing mechanism. It might not be perfect but I don't need to get the network team engaged and it works well enough for my use case. Again, the documentation [https://metallb.universe.tf/configuration/] is well written and straight forward. Here's my setup in case you want to see it.$ cat metal-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 10.9.176.10-10.9.176.250
You can also setup multiple pools each with a different name but this is more complicated than I need.
No comments:
Post a Comment