Installing Redpanda on macOS
You can only run Redpanda directly on Linux. However, you can run Redpanda on macOS in a Docker container. This guide helps you get started with Redpanda for development and testing on macOS.
For production or benchmarking, see Deploying for Production.
Get Redpanda running
To run Redpanda on MacOS, use rpk
to bring up Redpanda nodes in Docker containers.
Make sure that you install Docker first.
To customize the containers, you can also set up your own Redpanda containers in Docker.
Install rpk
You can install rpk
on MacOS either with Homebrew, or you can just download the binary.
-
To install
rpk
with Homebrew:brew install redpanda-data/tap/redpanda
-
To download the
rpk
binary:-
Download the rpk archive with
curl -LO https://github.com/redpanda-data/redpanda/releases/latest/download/rpk-darwin-amd64.zip
. -
Unpack the archive to
/usr/local/bin
or any location in your$PATH
withunzip rpk-darwin-amd64.zip
.
-
Run a Redpanda cluster
Run Redpanda in a three-node cluster:
rpk container start -n 3
The first time you run rpk container start
, it downloads an image matching the rpk version (you can check it by running rpk version
).
You now have a three-node cluster running Redpanda.
The command output shows the addresses of the cluster nodes:
$ rpk container start -n 3
Downloading latest version of Redpanda
Starting cluster
Waiting for the cluster to be ready...
NODE ID ADDRESS
0 127.0.0.1:49462
1 127.0.0.1:49468
2 127.0.0.1:49467
You can run rpk
commands to interact with the cluster; for example:
rpk cluster info --brokers 127.0.0.1:49462,127.0.0.1:49468,127.0.0.1:49467
Delete the nodes
When you’re finished with the cluster, shut down and delete the nodes:
rpk container purge