在minikube上配置kafka+minio

nle07wnf  于 2021-06-08  发布在  Kafka
关注(0)|答案(1)|浏览(708)

我想在minikube(v0.28.0)上运行minio resize函数。我安装了kubekess(v0.6.0)并使用此版本提供的yaml文件(kafka-zookeeper-v0.6.0.yaml)部署了kafka。
我按照以下步骤安装了minio。我还在.minio/config.json中mc并启用了kafka,似乎所有的东西都部署正确。

$ kubectl get services
  NAME           TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
  broker         ClusterIP   None             <none>        9092/TCP            2d
  kafka          ClusterIP   10.98.179.36     <none>        9092/TCP            2d
  kubernetes     ClusterIP   10.96.0.1        <none>        443/TCP             6d
  minio          ClusterIP   None             <none>        9000/TCP            3d
  minio-public   ClusterIP   10.101.140.13    <none>        9000/TCP            3d
  zoo            ClusterIP   None             <none>        9092/TCP,3888/TCP   2d
  zookeeper      ClusterIP   10.107.189.185   <none>        2181/TCP            2d
$ kubectl get pods
  NAME                     READY     STATUS    RESTARTS   AGE
  hello-696b7f4964-894d5   1/1       Running   2          4d
  kafka-0                  1/1       Running   3          2d
  minio-0                  1/1       Running   1          3d
  minio-1                  1/1       Running   1          3d
  minio-2                  1/1       Running   1          3d
  minio-3                  1/1       Running   1          3d
  zoo-0                    1/1       Running   1          2d
$ kubectl get deployments
  NAME                       DESIRED   CURRENT   UP-TO-DATE   AVAILABLE   AGE
  kafka-trigger-controller   1         0         0            0           2d

但是,我无法将事件添加到本地minio。这是错误。

$ mc events add localminio/foobar arn:minio:sqs:us-east-1:1:kafka --events put
 mc: <ERROR> Cannot enable notification on the specified bucket. A specified destination ARN does not exist or is not well-formed. Verify the destination ARN.
x6492ojm

x6492ojm1#

@user1027336 arn似乎是正确的。只有当config.json中的kafka部分设置不正确或kafka设置不正确时,才会出现此错误。我发现https://linuxhint.com/install-apache-kafka-ubuntu/ 对安装很有帮助 kafka 在ubuntu机器上。就config.json而言,
这就是我所拥有的 "kafka": { "1": { "enable": true, "brokers": ["localhost:9092"], "topic": "testing" } }, https://blog.minio.io/part-6-6-publish-minio-events-via-kafka-83aa606ffb65 对如何使用minio启用kafka进行了很好的描述

相关问题