【发布时间】:2020-11-12 00:42:40
【问题描述】:
我已经在 minikube 上使用linkedin Cruise Control 建立了一个 kafka 集群。我正在尝试按照Cruise Control ui git hub page 上的步骤启用巡航控制 GUI,但它不起作用。
当我从 pod 中卷曲地址时,它会从我要输入的页面返回 html 代码,但是当我在我的网络浏览器中尝试时,页面没有连接。我想我需要通过服务公开 pod,但它也不起作用。我还尝试更改 Cruisecontrol.properties 上的属性,但没有。
Pod 正在运行:
cruise-control-cbdd6bf54-prfts 1/1 Running 2 23h
kafka-0 1/1 Running 1 23h
kafka-1 1/1 Running 3 23h
kafka-2 1/1 Running 1 23h
pzoo-0 1/1 Running 0 23h
pzoo-1 1/1 Running 0 23h
pzoo-2 1/1 Running 1 23h
topic-cruise-control-metrics-fjdlw 0/1 Completed 0 23h
zoo-0 1/1 Running 1 23h
zoo-1 1/1 Running 1 23h
巡航控制吊舱
Containers:
cruise-control:
Container ID: docker://b6d43bb8db047480374b19671a761013a2fba39a398215276ffb456a1d9a9f2d
Image: solsson/kafka-cruise-control@sha256:f48acf73d09e6cf56f15fd0b9057cad36b3cee20963a52d263732bf7e5c1aae1
Image ID: docker-pullable://solsson/kafka-cruise-control@sha256:f48acf73d09e6cf56f15fd0b9057cad36b3cee20963a52d263732bf7e5c1aae1
Port: 8090/TCP
Host Port: 0/TCP
State: Running
Started: Tue, 21 Jul 2020 10:32:27 -0300
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Tue, 21 Jul 2020 10:31:47 -0300
Finished: Tue, 21 Jul 2020 10:31:59 -0300
Ready: True
Restart Count: 2
Requests:
cpu: 100m
memory: 512Mi
Readiness: tcp-socket :8090 delay=0s timeout=1s period=10s #success=1 #failure=3
Environment: <none>
Mounts:
/opt/cruise-control/config from config (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-5kp9f (ro)
cruisecontrol.properties
configurations for the webserver
# ================================
# HTTP listen port
webserver.http.port=8090
# HTTP listen address
webserver.http.address=0.0.0.0
# Whether CORS support is enabled for API or not
webserver.http.cors.enabled=false
# Value for Access-Control-Allow-Origin
webserver.http.cors.origin=http://localhost:8080/
# Value for Access-Control-Request-Method
webserver.http.cors.allowmethods=OPTIONS,GET,POST
# Headers that should be exposed to the Browser (Webapp)
# This is a special header that is used by the
# User Tasks subsystem and should be explicitly
# Enabled when CORS mode is used as part of the
# Admin Interface
webserver.http.cors.exposeheaders=User-Task-ID
# REST API default prefix
# (dont forget the ending *)
webserver.api.urlprefix=/kafkacruisecontrol/*
# Location where the Cruise Control frontend is deployed
webserver.ui.diskpath=./cruise-control-ui/dist/
# URL path prefix for UI
# (dont forget the ending *)
webserver.ui.urlprefix=/*
抄送服务
Name: cruise-control
Namespace: mindlabs
Labels: <none>
Annotations: Selector: app=cruise-control
Type: ClusterIP
IP: 10.98.201.106
Port: <unset> 8090/TCP
TargetPort: 8090/TCP
Endpoints: 172.18.0.14:8090
Session Affinity: None
Events: <none>
感谢您的帮助!
【问题讨论】:
-
你已经解决了吗?该服务应通过 minikube 公开。
kubectl get svc的输出是什么?
标签: kubernetes apache-kafka minikube