Kafka-compatible event streaming on macOS in less than one minute

This is the fastest way to get up and running with Redpanda on your Mac and be API-compatible with Apache Kafka.

April 19, 2022
Last modified on
TL;DR Takeaways:
How can I clean up my streaming data environment in Redpanda?

To clean up your streaming data environment in Redpanda, you can shut down and delete the node(s) using the command 'rpk container purge'. This command will clean up your streaming data environment.

How can I install Redpanda and its command line interface, rpk, on my Mac?

If you have Homebrew and Docker Desktop installed on your Mac, you can install Redpanda and its command line interface, rpk, with a single line of code. After running the command, Redpanda and rpk will be installed successfully, and you'll have created your first, single-node cluster.

How can I produce and consume messages in Redpanda?

You can produce and consume messages in Redpanda using the rpk command line interface. To produce a message, use the command 'rpk topic produce topic_name --brokers ', and type the message you want to produce. To consume a message, use the command 'rpk topic consume topic_name --brokers '. If the message was produced and consumed correctly, you'll get a confirmation message.

How can I set up a three-node cluster in Redpanda?

To set up a three-node cluster in Redpanda, first purge your existing single-node cluster using the command 'rpk container purge'. Then, use the command 'rpk container start -n 3' to start a new, three-node cluster. You will need to note the brokers listed in the output of this command to run commands in rpk.

What if I don't have Docker or Homebrew installed on my Mac?

If you don't have Docker Desktop and Homebrew on your machine, you can still install these tools and start using Redpanda. You can install Docker on your Mac by going to Docker's website and selecting the architecture-appropriate version of Docker Desktop to download for your machine. To install Homebrew, you can copy a specific script into your macOS terminal.

Learn more at Redpanda University

Introduction

Redpanda makes it easy to create a streaming data environment, while also keeping you API-compatible with Apache Kafka®. If you’re one of the many developers who already have Homebrew and Docker Desktop installed on your Mac, you can get up and running with Redpanda very quickly. In this post, we’ll show you how to install Redpanda and its command line interface, rpk, in one minute or less.

If you prefer to use Kubernetes, you can find more information about K8s options for Redpanda here. For Linux, kind and minikube are the simplest ways to get running with Redpanda.

The single fastest way to start using Redpanda on macOS

Most developers who use Mac already have Homebrew and Docker Desktop installed. In this case, you only need a single line of code to start using Redpanda:

brew install redpanda-data/tap/redpanda && rpk container start

This single command line will install both Redpanda, as well as its CLI, which is called rpk. When you paste the above command into your terminal, you’ll see something like this:

Set up

Redpanda and rpk have been installed successfully, and you’ve created your first, single-node cluster! It’s that easy.

You can now use rpk to interact with the node. But, first, here’s how you can get to this point if you don’t already have Docker and Homebrew installed on your machine

If you don’t have Docker or Homebrew installed

If you don’t already have Docker Desktop and Homebrew on your machine, don’t worry. It’s still very easy to install these tools and start using Redpanda. Here’s how to get set up with these prerequisites:

1. Install Docker Desktop

To install Docker on your Mac, go to this page and select the architecture-appropriate version of Docker Desktop to download for your machine.

Note that your macOS must be V10.15 or newer (Catalina, Big Sur, or Monterey versions) in order to run Docker.

2. Install Homebrew

Install Homebrew by copy the following script into your macOS terminal:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

With these prerequisites installed, you can now use the single command line above to start using Redpanda on your machine.

Have some fun with Redpanda and rpk

Now that you have a one-node cluster up and running, you can use our list of rpk commands to experiment and interact with Redpanda.

Setting up a three-node cluster

To prepare your environment to start a new cluster, first purge your existing single-node cluster using rpk container purge.

Now you can use rpk container start -n 3 to start a new, three-node cluster.

You will see something like this:

Three nodes

Be sure to note the brokers listed in this output. You will need them to run commands in rpk.

You can now further interact with the cluster. Use rpk to create a topic:

rpk topic create topic_name --brokers <broker_1><broker_2><broker_3>

Example:

Create topic

Produce to your topic using:

rpk topic produce topic_name --brokers <broker_1><broker_2><broker_3>

Type a test message you want produced to your topic. For example:

hello world!

If the message was produced correctly, you’ll get a message similar to the following:

Produced to partition 0 at offset 0 with timestamp 1646948687487.

Example:

Produce message

To consume from the topic, run:

rpk topic consume topic_name --brokers <broker_1><broker_2><broker_3>

If the message was consumed correctly, you’ll get an output similar to this:

Consume message

Congratulations! You just did your first bit of data streaming on Redpanda.

Follow the rpk command documentation for more commands you can use.

When you’re done working within your node or cluster, shut it down and delete the node(s) using rpk container purge. This will clean up your streaming data environment.

Take the next step!

If you have any questions getting started with Redpanda and rpk, please join our community Slack. You can also find our rpk command documentation here, and our full, source-available GitHub repository here.

No items found.

Related articles

View all posts
Towfiqa Yasmeen
,
Mike Broberg
,
&
Feb 3, 2026

Redpanda Serverless now Generally Available

Zero-ops simplicity meets enterprise-grade security to unlock production-ready data streaming for builders

Read more
Text Link
Jake Cahill
,
,
&
Jan 29, 2026

Bloblang playground just got smarter

Smarter autocomplete, dynamic metadata detection, and swifter collaboration

Read more
Text Link
Redpanda
,
,
&
Dec 16, 2025

How to build a governed Agentic AI pipeline with Redpanda

Everything you need to move agentic AI initiatives to production — safely

Read more
Text Link
PANDA MAIL

Stay in the loop

Subscribe to our VIP (very important panda) mailing list to pounce on the latest blogs, surprise announcements, and community events!
Opt out anytime.