英文:
AKHQ: Couldn't find any clusters on your configuration file, please ensure that the configuration file is loaded correctly
问题
我的Kubernetes中的Kafka引导服务器位于hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
。
我正在尝试在我的Kubernetes集群中部署AKHQ。以下是我的步骤:
helm upgrade \
akhq \
akhq \
--install \
--repo=https://akhq.io \
--namespace=hm-akhq \
--create-namespace \
--values=my-values.yaml
my-values.yaml
akhq:
connections:
hm-kafka:
properties:
bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
我创建了这个my-values.yaml基于这个。但是,我确信我正确使用它。
然后,我通过kubectl port-forward service/akhq --namespace=hm-akhq 8080:80
进行了端口转发。
然而,当我打开localhost:8080时,页面显示:
{
"message": "无法在配置文件中找到任何集群,请确保配置文件已正确加载",
"_links": {
"self": {
"href": "/",
"templated": false
}
}
}
我已阅读了具有相同错误的这些问题:
- https://github.com/tchiotludo/akhq/issues/63
- https://github.com/tchiotludo/akhq/issues/106
- https://github.com/tchiotludo/akhq/issues/604
但是我没有找到任何解决我的问题的解决方案。任何指南将不胜感激。谢谢!
英文:
My Kafka bootstrap server in Kubernetes is at hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
.
I am trying to deploy AKHQ in my Kubernetes cluster. Here are my steps:
helm upgrade \
akhq \
akhq \
--install \
--repo=https://akhq.io \
--namespace=hm-akhq \
--create-namespace \
--values=my-values.yaml
my-values.yaml
akhq:
connections:
hm-kafka:
properties:
bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
I created this my-values.yaml is based on this. However, I am sure I use it correctly.
Then I port forwarded by kubectl port-forward service/akhq --namespace=hm-akhq 8080:80
However, when I open localhost:8080, the page shows
{
"message": "Couldn't find any clusters on your configuration file, please ensure that the configuration file is loaded correctly",
"_links": {
"self": {
"href": "/",
"templated": false
}
}
}
I have read these tickets with same error
- https://github.com/tchiotludo/akhq/issues/63
- https://github.com/tchiotludo/akhq/issues/106
- https://github.com/tchiotludo/akhq/issues/604
But I didn't find any solution inside to solve my issue. Any guide would be appreciate. Thanks!
答案1
得分: 0
'akhq.connections' 应该位于 'configuration' 而不是 'secrets'。以下是最终工作版本:
helm upgrade \
akhq \
akhq \
--install \
--repo=https://akhq.io \
--namespace=hm-akhq \
--create-namespace \
--values=my-values.yaml
my-values.yaml
configuration:
akhq:
connections:
hm-kafka:
properties:
bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
schema-registry:
type: confluent
url: http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081
英文:
Thanks @OneCrckerteer help! The comments inside this section of values.yaml and akhq.connections
under secrets
originally confused me:
## You can put directly your configuration here... or add java opts or any other env vars
extraEnv: []
# - name: AKHQ_CONFIGURATION
# value: |
# akhq:
# secrets:
# docker-kafka-server:
# properties:
# bootstrap.servers: "kafka:9092"
# - name: JAVA_OPTS
# value: "-Djavax.net.ssl.trustStore=/opt/java/openjdk/lib/security/cacerts -Djavax.net.ssl.trustStorePassword=password"
# - name: CLASSPATH
# value: "/any/additional/jars/desired.jar:/go/here.jar"
## Or you can also use configmap for the configuration...
configuration:
akhq:
server:
access-log:
enabled: false
name: org.akhq.log.access
##... and secret for connection information
existingSecrets: ""
# name of the existingSecret
secrets: {}
# akhq:
# connections:
# my-cluster-plain-text:
# properties:
# bootstrap.servers: "kafka:9092"
# schema-registry:
# url: "http://schema-registry:8085"
# type: "confluent"
# basic-auth-username: basic-auth-user
# basic-auth-password: basic-auth-pass
# connect:
# - name: "my-connect"
# url: "http://connect:8083"
# basic-auth-username: basic-auth-user
# basic-auth-password: basic-auth-pass
akhq.connections
should be under configuration
instead of secrets
. And here is the final working version:
helm upgrade \
akhq \
akhq \
--install \
--repo=https://akhq.io \
--namespace=hm-akhq \
--create-namespace \
--values=my-values.yaml
my-values.yaml
configuration:
akhq:
connections:
hm-kafka:
properties:
bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
schema-registry:
type: confluent
url: http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论