KubeMQ Quick Start

Welcome to KubeMQ!

In this guide, we’ll walk you through how to install KubeMQ into your Kubernetes cluster. Then we’ll send and receive messages to verify your KubeMQ installation.

Installing KubeMQ is easy. First, you will install kubemqctl the KubeMQ CLI (command-line interface) onto your local machine. Using this CLI, you’ll then install KubeMQ cluster into your Kubernetes cluster. Finally, you’ll send a hello-world message to a queue and retrieve the message for verification of proper KubeMQ cluster installation.

Step 0 - Setup

Before we can do anything, we need to ensure you have access to a Kubernetes cluster running 1.12 or later, and a functioning kubectl command on your local machine. (One easy option is to run Kubernetes on your local machine. We suggest Docker Desktop or Minikube, but there are many options.)

When ready, make sure you’re running a recent version of Kubernetes with:

kubectl version --short
1

In the next step, we will install the kubemqctl the KubeMQ CLI and validate that your cluster is ready to send and receive messages.

Step 1 - Get KubeMQ CLI - kubemqctl

Kubemqctl is a CLI (Command Line Interface) tool to deploy and manage KubeMQ clusters.

macOS / Linux

curl -sL https://get.kubemq.io/install | sh 
1

Windows

Option 1:

  • Download the latest kubemqctl.exe.
  • Place the file under e.g. C:\Program Files\kubemqctl\kubemqctl.exe
  • Add that directory to your system path to access it from any command prompt

Option 2:

Run in PowerShell as administrator:

New-Item -ItemType Directory 'C:\Program Files\kubemqctl'
Invoke-WebRequest https://github.com/kubemq-io/kubemqctl/releases/download/latest/kubemqctl.exe -OutFile 'C:\Program Files\kubemqctl\kubemqctl.exe'
[Environment]::SetEnvironmentVariable('Path', [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine) + ';C:\Program Files\kubemqctl', [EnvironmentVariableTarget]::Machine)
$env:Path += ';C:\Program Files\kubemqctl'
1
2
3
4

Step 2 - Create KubeMQ Cluster

Now that you have kubemqctl installed, we will create a KubeMQ cluster:

Run kubemqctl create cluster command:

kubemqctl cluster create -t <YOUR_KUBEMQ_TOKEN>
1

Step 3 - Send 'hello-world'

After you have created a KubeMQ cluster, you can send hello-world message to q1 queue channel.

kubemqctl queue send q1 hello-world
1

Step 4 - Get 'hello-world'

After you have sent a message to q1 queue channel, you can retrieve the message like this:

kubemqctl queue receive q1
1

Demo

KubeMQ Quick Start:

Learn More

Get Started with Patterns

Messages Patterns and Core Concepts

Development

Last Updated: 10/2/2019, 10:27:00 AM