-
Notifications
You must be signed in to change notification settings - Fork 461
BGP 支持
Oilbeater edited this page Apr 27, 2020
·
8 revisions
v1.2 之后,Kube-OVN 支持将 Pod IP 以 BGP 的路由协议向外进行广播。为了启用 BGP 相关功能需要安装 kube-ovn-speaker
并给需要对外广播 IP 的 Pod 增加相应的 annotation。
- 下载
kube-ovn-speaker
yaml
wget https://github.com/alauda/kube-ovn/blob/master/yamls/speaker.yaml
- 修改 yaml 中的 args 部分配置
--neighbor-address=10.32.32.1 # 建立 bgp peers 的上游路由器地址
--neighbor-as=65030 # 路由器的 AS 号
--cluster-as=65000 # 容器网络的 AS 号
- 执行 yaml
kubectl apply -f speaker.yaml
# 开启 BGP
kubectl annotate pod sample ovn.kubernetes.io/bgp=true
# 禁用 BGP
kubectl annotate pod perf-ovn-xzvd4 ovn.kubernetes.io/bgp-