RabbitMQ for Kubernetes
You should have the following tools installed:
- kubectl
- gcloud
- kubebuilder
- counterfeiter (run
go get -u github.com/maxbrunsfeld/counterfeiter
)
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 is a local environment deployer similar to minikube but multi-node. You can deploy to it by:
- Installing kind
- Running
kind create cluster
- Switching
kubectl
to target local cluster using
export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"
- Edit
templates/kustomization.yaml
- setnamePrefix
andcommonLabels
and/ornamespace
erlang-cookie
- Generate and set the
erlang-cookie
- 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.
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.
- gcloud config set project cf-rabbitmq
gcloud auth configure-docker
make image
- To deploy, run
make deploy
- To delete the cluster run
kubectl delete -f {path to yaml used to deploy e.g. '/config/default/samples/rabbitmq_v1beta1_rabbitmqcluster.yaml}
- To delete the operator run
kubectl delete -k config/default
- If you've deployed a cluster manually, delete the cluster by running
kubectl delete -k templates