Deploy RabbitMQ on KubeSphere

RabbitMQ is the most widely deployed open-source message broker. It is lightweight and easy to deploy on premises and in the cloud. It supports multiple messaging protocols. RabbitMQ can be deployed in distributed and federated configurations to meet high-scale, high-availability requirements.

This tutorial walks you through an example of how to deploy RabbitMQ from the App Store of KubeSphere.

Prerequisites

  • Please make sure you enable the OpenPitrix system.
  • You need to create a workspace, a project, and a user account for this tutorial. The account needs to be a platform regular user and to be invited as the project operator with the operator role. In this tutorial, you log in as project-regular and work in the project demo-project in the workspace demo-workspace. For more information, see Create Workspace, Project, Account and Role.

Hands-on Lab

Step 1: Deploy RabbitMQ from App Store

  1. On the Overview page of the project demo-project, click App Store in the top left corner.

    rabbitmq01

  2. Find RabbitMQ and click Deploy on the App Info page.

    find-rabbitmq

    click-deploy

  3. Set a name and select an app version. Make sure RabbitMQ is deployed in demo-project and click Next.

    rabbitmq03

  4. In App Config, you can use the default configuration directly or customize the configuration either by specifying fields in a form or editing the YAML file. Record the value of Root Username and the value of Root Password, which will be used later for login. Click Deploy to continue.

    rabbitMQ11

    rabbitMQ04

    Tip

    To see the manifest file, toggle the YAML switch.
  5. Wait until RabbitMQ is up and running.

    check-if-rabbitmq-is-running

Step 2: Access RabbitMQ Dashboard

To access RabbitMQ outside the cluster, you need to expose the app through NodePort first.

  1. Go to Services and click the service name of RabbitMQ.

    go-to-services

  2. Click More and select Edit Internet Access from the drop-down menu.

    rabbitmq07

  3. Select NodePort for Access Method and click OK. For more information, see Project Gateway.

    rabbitmq08

  4. Under Service Ports, you can see ports are exposed.

    rabbitmq09

  5. Access RabbitMQ management through {$NodeIP}:{$Nodeport}. Note that the username and password are those you set in Step 1. rabbitmq-dashboard

    rabbitma-dashboard-detail

    Note

    You may need to open the port in your security groups and configure related port forwarding rules depending on your where your Kubernetes cluster is deployed.
  6. For more information about RabbitMQ, refer to the official documentation of RabbitMQ.