RabbitMQ Topology Operator cant create Exchange on kubernetes

2/8/2022

i am trying to use rabbitMQ Topology Operator to manage a rabbitMQ cluster running on kubernetes.

As a setup i have deployed rabbitmq-cluster-operator to create cluster and enabled necessary plugins like the management plugin.

Next i deployed rabbitmq-topology operator in same namespace.

After definining some infrastructur for topology oeprator eg an Exchange the topology operator just logs ERRORs when trying to create the exchange

"Error: API responded with a 401 Unauthorized"

Seems like the topology operator can not authorize against the management api.

I followed instructions to install the operator here https://www.rabbitmq.com/kubernetes/operator/using-topology-operator.html

Iam wondering if a have to configure a user for the topology operator to authorize against the management api?

-- KleeKK
kubernetes
rabbitmq
topology

1 Answer

4/20/2022

The Topology Operator is using the "{RabbitClusterName}-default-user" secret and the RabbitMQ Cluster Operator is generating a random default username/password pair when it creates the cluster.

I had the same problem because I overwrote the default user and password in aditionalConfig and the one created by the operator didn't work anymore.

Make sure that the user from the {RabbitClusterName}-default-user secret works with the management api. It should be in the same namespace as the cluster.

-- Vlad B.
Source: StackOverflow