Skip to content

Commit

Permalink
update metallb docs (#6152)
Browse files Browse the repository at this point in the history
* update metallb docs

* Update debug.md

---------

Co-authored-by: Michael Yao <[email protected]>
  • Loading branch information
cyclinder and windsonsea authored Jan 24, 2025
1 parent c9c9747 commit ea11625
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/en/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ nav:
- Instructions for IP pool use: network/modules/metallb/usage.md
- L2 and BGP mode: network/modules/metallb/l2-bgp.md
- Get Client Source IPs: network/modules/metallb/source_ip.md
- Debug: network/modules/metallb/debug.md
- Multus-underlay:
- Intro: network/modules/multus-underlay/index.md
- Install: network/modules/multus-underlay/install.md
Expand Down
19 changes: 17 additions & 2 deletions docs/zh/docs/network/modules/metallb/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,37 @@ spec:

如果您使用 Metallb 遇到网络连通性问题,按照以下步骤排查:

- 检查 L2Advertisement 资源是否存在:
- 检查 L2Advertisement 资源是否存在,如果 L2Advertisement 资源配置了 NodeSelector,请确认有集群是否有节点配置该 Label。

```bash
kubectl get l2advertisement -n metallb-system
```

- 请确认该 LoadBalancer 是否存在正常运行的 Endpoint。

- 检查 LoadBalaner Service 的注解是否正确

- 检查 LoadBalaner Service 所用的 IP 池是否有充足的 IP

- 获取您的 LoadBalancer Service 的事件,获取关键错误信息:

```bash
kubectl describe svc -n <lb_service_ns> <lb_service_name>
```

> 如果未获取到任何事件,请重建服务然后获取。

- 通过服务名称过滤 Metallb 组件日志:
- 请确认您是否单集群节点或所有节点都是 Controller Plane 节点,如果是请清理 Controller Plane 节点上的 Labels: `node.kubernetes.io/exclude-from-external-load-balancers`

```bash
kubectl label nodes <Your_Controller_Plane_Node> node.kubernetes.io/exclude-from-external-load-balancers-
```

- 通过服务名称过滤 Metallb 组件日志,查看是否有相关错误信息。如果未有明显日志请编辑 metallb-speaker DaemonSet 的日志登记为 Debug。

```bash
kubectl logs -n metallb-system controller-xxxx | grep <lb_service_name>
kubectl logs -n metallb-system speaker-xxxx | grep <lb_service_name>
```

4 changes: 3 additions & 1 deletion docs/zh/docs/network/modules/metallb/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ hide:

1. 需要提前准备一段待使用的 `真实物理 IP` ,用于 IP 池创建。

> 注意:若需配置 Metallb ARP Mode,必须启用 Helm 并使其处于就绪等待状态
> 注意:若需配置 Metallb ARP Mode,必须启用 Helm 并使其处于**就绪等待状态**
![metallb-helm-wait](../../images/metallb_helm_wait.png)

2. 如果您开启 ARP 模式,默认情况下为了 VIP 会在节点的新建或删除后出现飘逸的情况。Metallb 只会向具有 Label: `node.spidernet.io/include-metallb-l2-loadbalancer=true` 的节点宣告 VIP。安装 Metallb 后,您必须手动为这些节点添加 Label:`node.spidernet.io/include-metallb-l2-loadbalancer=true`。如果您并不关心 VIP 飘逸的情况,您可以设置 `nodeSelectors``Key``Value` 为空。

## 安装步骤

请确认您的集群已成功接入`容器管理`平台,然后执行以下步骤安装 MetalLB。
Expand Down
1 change: 1 addition & 0 deletions docs/zh/navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ nav:
- IPPool 使用说明: network/modules/metallb/usage.md
- L2 和 BGP 模式说明: network/modules/metallb/l2-bgp.md
- 获取客户端源 IP: network/modules/metallb/source_ip.md
- 问题排查: network/modules/metallb/debug.md
- 集成 Multus-underlay:
- 介绍: network/modules/multus-underlay/index.md
- 安装: network/modules/multus-underlay/install.md
Expand Down

0 comments on commit ea11625

Please sign in to comment.