簡體   English   中英

AKHQ:在您的配置文件中找不到任何集群,請確保正確加載配置文件

[英]AKHQ: Couldn't find any clusters on your configuration file, please ensure that the configuration file is loaded correctly

我在 Kube.netes 中的 Kafka 引導程序服務器位於hm-kafka-kafka-bootstrap.hm-kafka.svc:9092

我正在嘗試在我的 Kube.netes 集群中部署AKHQ 這是我的步驟:

helm upgrade \
  akhq \
  akhq \
  --install \
  --repo=https://akhq.io \
  --namespace=hm-akhq \
  --create-namespace \
  --values=my-values.yaml

我的價值觀.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": "Couldn't find any clusters on your configuration file, please ensure that the configuration file is loaded correctly",
  "_links": {
    "self": {
      "href": "/",
      "templated": false
    }
  }
}

我讀過這些票,但有同樣的錯誤

但是我沒有在里面找到任何解決方案來解決我的問題。 任何指南將不勝感激。 謝謝!

感謝@OneCrckerteer 的幫助! secretsvalues.yamlakhq.connections這部分的注釋最初讓我感到困惑:

## 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應該在configuration而不是secrets下。 這是最終的工作版本:

helm upgrade \
  akhq \
  akhq \
  --install \
  --repo=https://akhq.io \
  --namespace=hm-akhq \
  --create-namespace \
  --values=my-values.yaml

我的價值觀.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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM