我正在安装 1 节点 k8s 集群,无法从同一子网访问 metallb IP 地址。
CRI = Containerd 1.6
CNI = Flannel.
control-plane taint is disabled
Pod CIDR = 10.244.0.0/16
Cluster CIDR = 10.105.107.0/24
Kube-proxy mode - IPVS with strictArp "true"
我的 metallb 配置清单:
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: first-pool
namespace: metallb-system
spec:
addresses:
- 10.105.107.224/27
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: first-advertisement
namespace: metallb-system
spec:
ipAddressPools:
- first-pool
当我创建服务(例如 ingress-nginx)时 - IP 地址分配正确,我可以通过 curl 10.105.107.224 从我的节点连接它们,但我没有看到已宣布的事件 kubectl describe svc
(只有 IP 分配事件)。这意味着来自同一子网和广播域中的任何其他主机的 curl 都不起作用,arping 也不起作用。我也没有在演讲者那边看到任何警告或错误。我看到了与此主题相关的不同主题,并两次重新检查了我的子网、配置和其他内容,但没有想法。来自控制器的日志:
来自发言人的记录:
{"caller":"config_controller.go:150","controller":"ConfigReconciler","end reconcile":"/default","level":"info","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"/ingress-nginx","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:150","controller":"ConfigReconciler","end reconcile":"/ingress-nginx","level":"info","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"/kube-flannel","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:150","controller":"ConfigReconciler","end reconcile":"/kube-flannel","level":"info","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"/kube-node-lease","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:150","controller":"ConfigReconciler","end reconcile":"/kube-node-lease","level":"info","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"/kube-public","ts":"2024-03-17T18:40:17Z"}
{"caller":"config_controller.go:150","controller":"ConfigReconciler","end reconcile":"/kube-public","level":"info","ts":"2024-03-17T18:40:17Z"}
{"caller":"service_controller.go:64","controller":"ServiceReconciler","level":"info","start reconcile":"metallb-system/webhook-service","ts":"2024-03-17T18:40:26Z"}
{"caller":"service_controller.go:115","controller":"ServiceReconciler","end reconcile":"metallb-system/webhook-service","level":"info","ts":"2024-03-17T18:40:26Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"metallb-system/first-pool","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:167","controller":"ConfigReconciler","event":"force service reload","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:178","controller":"ConfigReconciler","event":"config reloaded","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:179","controller":"ConfigReconciler","end reconcile":"metallb-system/first-pool","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller_reload.go:63","controller":"ServiceReconciler - reprocessAll","level":"info","start reconcile":"metallbreload/reload","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller_reload.go:119","controller":"ServiceReconciler - reprocessAll","end reconcile":"metallbreload/reload","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller.go:64","controller":"ServiceReconciler","level":"info","start reconcile":"ingress-nginx/ingress-nginx-controller","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller.go:115","controller":"ServiceReconciler","end reconcile":"ingress-nginx/ingress-nginx-controller","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:58","controller":"ConfigReconciler","level":"info","start reconcile":"metallb-system/first-advertisement","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:167","controller":"ConfigReconciler","event":"force service reload","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:178","controller":"ConfigReconciler","event":"config reloaded","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"config_controller.go:179","controller":"ConfigReconciler","end reconcile":"metallb-system/first-advertisement","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller_reload.go:63","controller":"ServiceReconciler - reprocessAll","level":"info","start reconcile":"metallbreload/reload","ts":"2024-03-17T18:40:33Z"}
{"caller":"service_controller_reload.go:119","controller":"ServiceReconciler - reprocessAll","end reconcile":"metallbreload/reload","level":"info","ts":"2024-03-17T18:40:33Z"}
{"caller":"node_controller.go:46","controller":"NodeReconciler","level":"info","start reconcile":"/k8s-1","ts":"2024-03-17T18:44:32Z"}
{"caller":"speakerlist.go:274","level":"info","msg":"triggering discovery","op":"memberDiscovery","ts":"2024-03-17T18:44:32Z"}
{"caller":"node_controller.go:69","controller":"NodeReconciler","end reconcile":"/k8s-1","level":"info","ts":"2024-03-17T18:44:32Z"}
{"caller":"node_controller.go:46","controller":"NodeReconciler","level":"info","start reconcile":"/k8s-1","ts":"2024-03-17T18:49:39Z"}
{"caller":"speakerlist.go:274","level":"info","msg":"triggering discovery","op":"memberDiscovery","ts":"2024-03-17T18:49:39Z"}
{"caller":"node_controller.go:69","controller":"NodeReconciler","end reconcile":"/k8s-1","level":"info","ts":"2024-03-17T18:49:39Z"}
{"caller":"node_controller.go:46","controller":"NodeReconciler","level":"info","start reconcile":"/k8s-1","ts":"2024-03-17T18:54:45Z"}
{"caller":"speakerlist.go:274","level":"info","msg":"triggering discovery","op":"memberDiscovery","ts":"2024-03-17T18:54:45Z"}
{"caller":"node_controller.go:69","controller":"NodeReconciler","end reconcile":"/k8s-1","level":"info","ts":"2024-03-17T18:54:45Z"}