Windows 和 BGP

在 Windows 上启用 Calico 的 BGP

要在使用 Linux 和 Windows 节点的 RKE2 中启用 BGP 模式以路由流量,应该在服务器配置中选择 Calico CNI。

# /etc/rancher/rke2/config.yaml
cni: calico

然后应将 Calico 配置为启用 BGP,并将封装设置为 None

# /var/lib/rancher/rke2/server/manifests/rke2-calico-config.yaml
apiVersion: helm.cattle.io/v1
kind: HelmChartConfig
metadata:
  name: rke2-calico
  namespace: kube-system
spec:
  valuesContent: |-
    installation:
      calicoNetwork:
        bgp: Enabled
      backend: "None"

启动 Windows 节点

按照 这里 的描述在 Windows 节点上配置 RKE2。

在启动 RKE2 服务之前,必须启用 RemoteAccess

Install-WindowsFeature RemoteAccess
Install-WindowsFeature RSAT-RemoteAccess-PowerShell
Install-WindowsFeature Routing

这需要重启才能正常工作。

接下来,配置 RemoteAccess 服务:

Install-RemoteAccess -VpnType RoutingOnly

要检查 RemoteAccess 服务是否已正确启动,请使用以下命令:

Start-Service RemoteAccess

之后,您可以启动 RKE2 服务。