Difference between revisions of "Metallb"
Jump to navigation
Jump to search
Line 9: | Line 9: | ||
- https://devopslearning.medium.com/metallb-load-balancer-for-bare-metal-kubernetes-43686aa0724f | - https://devopslearning.medium.com/metallb-load-balancer-for-bare-metal-kubernetes-43686aa0724f | ||
+ | |||
+ | |||
+ | |||
+ | # BGP with frr password doesn't seem to work | ||
+ | |||
+ | frr | ||
+ | ``` | ||
+ | frr version 8.1 | ||
+ | frr defaults traditional | ||
+ | hostname hm0101 | ||
+ | log syslog informational | ||
+ | log file /var/log/frr/frr.log | ||
+ | service integrated-vtysh-config | ||
+ | ! | ||
+ | ip router-id 10.x.x.r | ||
+ | ! | ||
+ | router bgp 65551 | ||
+ | bgp log-neighbor-changes | ||
+ | neighbor 10.x.x.x remote-as 65551 | ||
+ | ! neighbor 10.x.x.x password metallb | ||
+ | neighbor 10.x.x.y remote-as 65551 | ||
+ | ! neighbor 10.x.x.y password metallb | ||
+ | neighbor 10.x.x.z remote-as 65551 | ||
+ | ! neighbor 10.x.x.z password metallb | ||
+ | exit | ||
+ | ! | ||
+ | ``` | ||
+ | |||
+ | metallb-system configMap config config.yaml | ||
+ | ``` | ||
+ | apiVersion: v1 | ||
+ | kind: ConfigMap | ||
+ | metadata: | ||
+ | namespace: metallb-system | ||
+ | name: config | ||
+ | data: | ||
+ | config: | | ||
+ | peers: | ||
+ | - # a test below is router/fw id | ||
+ | peer-address: 10.x.x.r | ||
+ | peer-asn: 65551 | ||
+ | my-asn: 65551 | ||
+ | # password: "metallb" | ||
+ | address-pools: | ||
+ | - name: my-ip-space | ||
+ | protocol: bgp | ||
+ | avoid-buggy-ips: true | ||
+ | addresses: | ||
+ | - 192.168.254.0/24 | ||
+ | ``` | ||
+ | |||
+ | |||
+ | |||
+ | |||
Revision as of 17:06, 19 December 2021
Get started with Microk8s
If firewall/router in front you can route or dnat form public ip to metallb private address assignment
sudo ip route add 10.x.x.0/22 via 10.y.y.y (10.y.y.y is k8s instance ip address though usually you would use bgp)
- https://microk8s.io/docs/addon-metallb 10.x.x.0/22 is your ip range
- https://devopslearning.medium.com/metallb-load-balancer-for-bare-metal-kubernetes-43686aa0724f
BGP with frr password doesn't seem to work
frr
frr version 8.1 frr defaults traditional hostname hm0101 log syslog informational log file /var/log/frr/frr.log service integrated-vtysh-config ! ip router-id 10.x.x.r ! router bgp 65551 bgp log-neighbor-changes neighbor 10.x.x.x remote-as 65551 ! neighbor 10.x.x.x password metallb neighbor 10.x.x.y remote-as 65551 ! neighbor 10.x.x.y password metallb neighbor 10.x.x.z remote-as 65551 ! neighbor 10.x.x.z password metallb exit !
metallb-system configMap config config.yaml
apiVersion: v1 kind: ConfigMap metadata: namespace: metallb-system name: config data: config: | peers: - # a test below is router/fw id peer-address: 10.x.x.r peer-asn: 65551 my-asn: 65551 # password: "metallb" address-pools: - name: my-ip-space protocol: bgp avoid-buggy-ips: true addresses: - 192.168.254.0/24
Other options
- https://github.com/meta-magic/metallb-baremetal-example
- https://stackoverflow.com/questions/63974879/microk8s-metallb-ingress-nginx-how-to-route-external-traffic
https://v0-2-1--metallb.netlify.app/tutorial/
arp
https://link.medium.com/xgtCprRJ0lb
https://manintheit.org/en/posts/kubernetes/kubernetes-metallb-loadbalancer-with-bgp-mode/