AKHQ: 无法在您的配置文件中找到任何集群,请确保配置文件已正确加载

huangapple go评论130阅读模式
英文:

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。以下是我的步骤:

  1. helm upgrade \
  2. akhq \
  3. akhq \
  4. --install \
  5. --repo=https://akhq.io \
  6. --namespace=hm-akhq \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml

  1. akhq:
  2. connections:
  3. hm-kafka:
  4. properties:
  5. 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时,页面显示:

  1. {
  2. "message": "无法在配置文件中找到任何集群,请确保配置文件已正确加载",
  3. "_links": {
  4. "self": {
  5. "href": "/",
  6. "templated": false
  7. }
  8. }
  9. }

我已阅读了具有相同错误的这些问题:

但是我没有找到任何解决我的问题的解决方案。任何指南将不胜感激。谢谢!

英文:

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:

  1. helm upgrade \
  2. akhq \
  3. akhq \
  4. --install \
  5. --repo=https://akhq.io \
  6. --namespace=hm-akhq \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml

  1. akhq:
  2. connections:
  3. hm-kafka:
  4. properties:
  5. 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

  1. {
  2. "message": "Couldn't find any clusters on your configuration file, please ensure that the configuration file is loaded correctly",
  3. "_links": {
  4. "self": {
  5. "href": "/",
  6. "templated": false
  7. }
  8. }
  9. }

I have read these tickets with same error

But I didn't find any solution inside to solve my issue. Any guide would be appreciate. Thanks!

答案1

得分: 0

'akhq.connections' 应该位于 'configuration' 而不是 'secrets'。以下是最终工作版本:

  1. helm upgrade \
  2. akhq \
  3. akhq \
  4. --install \
  5. --repo=https://akhq.io \
  6. --namespace=hm-akhq \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml

  1. configuration:
  2. akhq:
  3. connections:
  4. hm-kafka:
  5. properties:
  6. bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
  7. schema-registry:
  8. type: confluent
  9. 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:

  1. ## You can put directly your configuration here... or add java opts or any other env vars
  2. extraEnv: []
  3. # - name: AKHQ_CONFIGURATION
  4. # value: |
  5. # akhq:
  6. # secrets:
  7. # docker-kafka-server:
  8. # properties:
  9. # bootstrap.servers: "kafka:9092"
  10. # - name: JAVA_OPTS
  11. # value: "-Djavax.net.ssl.trustStore=/opt/java/openjdk/lib/security/cacerts -Djavax.net.ssl.trustStorePassword=password"
  12. # - name: CLASSPATH
  13. # value: "/any/additional/jars/desired.jar:/go/here.jar"
  14. ## Or you can also use configmap for the configuration...
  15. configuration:
  16. akhq:
  17. server:
  18. access-log:
  19. enabled: false
  20. name: org.akhq.log.access
  21. ##... and secret for connection information
  22. existingSecrets: ""
  23. # name of the existingSecret
  24. secrets: {}
  25. # akhq:
  26. # connections:
  27. # my-cluster-plain-text:
  28. # properties:
  29. # bootstrap.servers: "kafka:9092"
  30. # schema-registry:
  31. # url: "http://schema-registry:8085"
  32. # type: "confluent"
  33. # basic-auth-username: basic-auth-user
  34. # basic-auth-password: basic-auth-pass
  35. # connect:
  36. # - name: "my-connect"
  37. # url: "http://connect:8083"
  38. # basic-auth-username: basic-auth-user
  39. # basic-auth-password: basic-auth-pass

akhq.connections should be under configuration instead of secrets. And here is the final working version:

  1. helm upgrade \
  2. akhq \
  3. akhq \
  4. --install \
  5. --repo=https://akhq.io \
  6. --namespace=hm-akhq \
  7. --create-namespace \
  8. --values=my-values.yaml

my-values.yaml

  1. configuration:
  2. akhq:
  3. connections:
  4. hm-kafka:
  5. properties:
  6. bootstrap.servers: hm-kafka-kafka-bootstrap.hm-kafka.svc:9092
  7. schema-registry:
  8. type: confluent
  9. url: http://confluent-schema-registry.hm-confluent-schema-registry.svc:8081

huangapple
  • 本文由 发表于 2023年6月1日 06:21:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76377644.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定