大家好,我有一个入口控制器正在运行,我为 kafka 部署了一个入口(通过 strimzi 部署),但是入口向我显示地址的多个 Ip,而不是一个,所以我想知道为什么以及我能做什么从我在教程中看到的修复它,当你有一个入口时,地址中给出的 Ip 与入口控制器服务中的相同(在我的情况下它应该是:172.24.20.195)所以这里是ingres 控制器组件:
root@di-admin-general:/home/lda# kubectl get all -n ingress-nginx -o wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/default-http-backend-598b7d7dbd-ggghv 1/1 Running 2 6d3h 192.168.129.71 pr-k8s-fe-fastdata-worker-02 <none> <none>
pod/nginx-ingress-controller-4rdxd 1/1 Running 2 6d3h 172.24.20.8 pr-k8s-fe-fastdata-worker-02 <none> <none>
pod/nginx-ingress-controller-g6d2f 1/1 Running 2 6d3h 172.24.20.242 pr-k8s-fe-fastdata-worker-01 <none> <none>
pod/nginx-ingress-controller-r995l 1/1 Running 2 6d3h 172.24.20.38 pr-k8s-fe-fastdata-worker-03 <none> <none>
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/default-http-backend ClusterIP 192.168.42.107 <none> 80/TCP 6d3h app=default-http-backend
service/nginx-ingress-controller LoadBalancer 192.168.113.157 172.24.20.195 80:32641/TCP,443:32434/TCP 163m workloadID_nginx-ingress-controller=true
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE CONTAINERS IMAGES SELECTOR
daemonset.apps/nginx-ingress-controller 3 3 3 3 3 <none> 6d3h nginx-ingress-controller rancher/nginx-ingress-controller:nginx-0.35.0-rancher2 app=ingress-nginx
NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR
deployment.apps/default-http-backend 1/1 1 1 6d3h default-http-backend rancher/nginx-ingress-controller-defaultbackend:1.5-rancher1 app=default-http-backend
NAME DESIRED CURRENT READY AGE CONTAINERS IMAGES SELECTOR
replicaset.apps/default-http-backend-598b7d7dbd 1 1 1 6d3h default-http-backend rancher/nginx-ingress-controller-defaultbackend:1.5-rancher1 app=default-http-backend,pod-template-hash=598b7d7dbd
root@di-admin-general:/home/lda#
这是卡夫卡部分:
root@di-admin-general:/home/lda# kubectl get ingress -n kafkanew -o wide
NAME CLASS HOSTS ADDRESS PORTS AGE
kafka-ludo-kafka-0 <none> broker-0.172.24.20.195.nip.io 172.24.20.242,172.24.20.38,172.24.20.8 80, 443 5d22h
kafka-ludo-kafka-1 <none> broker-1.172.24.20.195.nip.io 172.24.20.242,172.24.20.38,172.24.20.8 80, 443 5d22h
kafka-ludo-kafka-2 <none> broker-2.172.24.20.195.nip.io 172.24.20.242,172.24.20.38,172.24.20.8 80, 443 5d22h
kafka-ludo-kafka-bootstrap <none> bootstrap.172.24.20.195.nip.io 172.24.20.242,172.24.20.38,172.24.20.8 80, 443 5d22h
您会看到我们有 3 个 ips (172.24.20.242,172.24.20.38,172.24.20.8) 而不是我认为应该是 172.24.20.195 的一个,请如果有人可以提供解释,链接到 srimzi yaml 用于在这里公开一个入口:https ://developers.redhat.com/blog/2019/06/12/accessing-apache-kafka-in-strimzi-part-5-ingress/ 谢谢你的帮助