Rabbitmq Operator

Gitpod ready-to-code CI build and Deploy Coverage Status

This is a operator which handles rabbitmq resources via kubernetes custom resource definitions. To manage rabbitmq clusters you can use the rabbitmq operator for instance.

Supported CRDs

  • Users
  • Permissions
  • Exchanges
  • Queues
  • Bindings
  • Shovles

Getting Started

Install the CRDs

kubectl apply -f https://raw.githubusercontent.com/kokuwaio/rabbitmq-operator/master/config/crd/bases/crds.yaml

Install the operator

kubectl apply -f https://raw.githubusercontent.com/kokuwaio/rabbitmq-operator/master/config/manager/manager.yaml

Using the operator

Creating a Cluster Reference

apiVersion: rabbitmq.kokuwa.io/v1beta1
kind: RabbitmqCluster
metadata:
  name: rabbitmqcluster-sample
spec:
  # URL for the admin api
  host: http://rabbitmq.default.svc:15672
  # username for the rabbitmq cluster
  # will only be used if secretRef.userKey is empty
  user: admin
  secretRef:
    # name of the secret
    name: rabbitmq
    # namespace where the secret is located
    # the crd is not namespace scoped, so the namespace is a required field
    namespace: default
    # key for the password if empty password will be used
    passwordKey: rabbitmq-password
    # key for the suer can be empty
    userKey: rabbitmq-user

Creating a User

password secret:

user crd:

apiVersion: rabbitmq.kokuwa.io/v1beta1
kind: RabbitmqUser
metadata:
  name: rabbitmquser-sample
spec:
  # name for the user
  name: my-examle-user
  # tags for the user
  tags: administrator
  secretRef:
    name: my-secret
    namespace: default
    key: password
  clusterRef:
    name: rabbitmqcluster-sample

Creating a Queue

Future Plan

  • Support all rabbitmq rest resources