Skip to content

rodrigoasfigueiredo/cluster-operator

Repository files navigation

rabbitmq-for-kubernetes

RabbitMQ for Kubernetes

Requirements

You should have the following tools installed:

How to get started

GKE

Most of the time we deploy to our GKE cluster. To start working against it, do the following:

gcloud container clusters get-credentials cluster-1 --zone europe-west1-c --project cf-rabbitmq

Core team members and other non-tile team collaborators, need to be added to the cf-rabbitmq Google Cloud project first.

Kind

Kind is a local environment deployer similar to minikube but multi-node. You can deploy to it by:

  1. Installing kind
  2. Running
kind create cluster
  1. Switching kubectl to target local cluster using
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"

How to deploy a RabbitMQ cluster manually

  1. Edit templates/kustomization.yaml - set namePrefix and commonLabels and/or namespace erlang-cookie
  2. Generate and set the erlang-cookie
  3. Run
kubectl apply -k templates

If this fails with a forbidden: attempt to grant extra privileges error, you need to grant yourself the Cluster Admin role:

kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user [email protected]

More information about Role Based Access.

RabbitMQ Kubernetes Operator

How to set up the Operator for development

We are gitignoring the vendor directory because it is huge. When getting started, run dep ensure to pull dependencies. Add the -v flag to see progress or be patient and trust that the process isn't hanging.

How to push the Operator docker image

  1. gcloud config set project cf-rabbitmq
  2. gcloud auth configure-docker
  3. make image
  4. To deploy, run make deploy

Tear down

  1. To delete the cluster run kubectl delete -f {path to yaml used to deploy e.g. '/config/default/samples/rabbitmq_v1beta1_rabbitmqcluster.yaml}
  2. To delete the operator run kubectl delete -k config/default
  3. If you've deployed a cluster manually, delete the cluster by running kubectl delete -k templates

Packages

No packages published

Languages

  • Go 93.5%
  • Shell 4.7%
  • Makefile 1.6%
  • Dockerfile 0.2%