我正在尝试将用户名和密码添加到我在 strimzi 上的 kafka 网桥..我不知道我是否配置正确,如果我配置正确,为什么我无法使用我的用户名和密码访问这是我的步骤做过:
秘密.yaml
apiVersion: v1
kind: Secret
metadata:
name: bridgeuser
type: Opaque
data:
my-password: cmdoR0ZETColMTY3Cg==
桥接器.yaml
apiVersion: kafka.strimzi.io/v1alpha1
kind: KafkaBridge
metadata:
name: my-bridge
spec:
replicas: 1
bootstrapServers: my-cluster-kafka-bootstrap:9092
http:
port: 8080
authentication:
type: plain
username: user
passwordSecret:
secretName: bridgeuser
password: my-password
这是产生消息的卷曲:
curl -X POST -u user:rghGFDL*%167 https://localhost:8080/topics/topic -H 'content-type: application/vnd.kafka.json.v2+json' -d '{"records": [{"key": "key-1","value": "welcome !!"},{"key": "key-2","value": "welcome !!"}]}'
当我这样尝试时,我得到了:
{
"offsets": [
{
"error_code": 500,
"message": "Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []"
},
{
"error_code": 500,
"message": "Unexpected handshake request with client mechanism PLAIN, enabled mechanisms are []"
}
]
}
如果有人可以帮助并提前感谢