如下所示配置一个新的BGP,注意BGP名称和ASNumber不能与已有的BGP冲突。
1 2 3 4 5 6 7 8 9 10 | apiVersion: projectcalico.org/v3 kind: BGPConfiguration metadata: name: default spec: logSeverityScreen: Info nodeToNodeMeshEnabled: true asNumber: 63400 serviceClusterIPs: - cidr: 10.244.0.0/16 |
参数配置详见官方介绍BGP配置。
1 | calicoctl apply -f - < bgp.yaml |
命令返回如下信息,表示添加成功。
1 | Successfully applied 1 ‘BGPConfiguration’ resource(s) |
calicoctl get bgpConfiguration -o wide
1 2 | NAME LOGSEVERITY MESHENAbLED ASNUMBER default Info true 63400 |