Get started with rpk: Redpanda’s dev-friendly CLI

A crash course on rpk to get you on track for simple, no-fuss cluster management

By
on
January 23, 2024

In the realm of streaming data, simplicity and efficiency can be elusive. Managing clusters often involves handling various tools, which in turn creates a complex and time-consuming nightmare. Our engineers know the pain all too well, so they built rpk—Redpanda's dev-friendly, all-in-one command-line tool that makes developers’ jobs easier.

The rpk stands for “Redpanda Keeper”—like the person who takes care of actual red pandas at a zoo, except in this case, you’re taking care of Redpanda clusters. In a nutshell, rpk consolidates all Redpanda's cluster management tasks into a single command-line interface so you can easily set up, configure, and manage your Redpanda clusters.

This (thankfully) contrasts with the usual fragmented approach of using multiple tools. With rpk, you can simplify cluster management, optimize broker configurations, streamline topic operations, fortify security measures, and generate templates for related services—all in one place. This ultimately provides a unified solution for administrators and developers alike.

In this blog, we'll cover rpk’s technical capabilities to illustrate how it can streamline your Redpanda experience. We’ll also include a video overview and wrap up with a shortlist of practical resources to kickstart your rpk journey.

Getting started with rpk

It’s always good to start with the bigger picture. So, to give you a better idea of how it all plays together, here’s a quick overview of what rpk gives you access to.

Diagram showing all the components that rpk enables you to manage
Diagram showing all the components that rpk enables you to manage

Now that’s out of the way, let’s dig into the specifics. Below are the main rpk capabilities you’ll want to get familiar with.

Version check

You can easily check what version of Redpanda your clusters are running using "rpk version". This simple command not only prints the cluster version but also the rpk version and related build information, such as build date, OS/arch, and which Go version was used to build it.

Cluster setup

To kick things off, you'll need to get your Redpanda cluster up and running. The rpk simplifies this process with a single rpk container command: rpk container start

With this tiny yet mighty command, rpk deploys a Redpanda cluster on your local machine using Docker. This feature is particularly loved by developers because it completely eliminates the need for an overly complex setup.

Cluster management

System administrators will find the "rpk cluster" commands invaluable for managing and fine-tuning their Redpanda clusters. These commands empower you to interact with the cluster as a whole, allowing adjustments to cluster-level configurations and the management of individual brokers. You can modify settings, import configurations, and even perform force resets when necessary.

Broker/node management

The rpk also provides the rpk redpanda commands to manage individual nodes within the cluster.

Organized cluster management with profiles

Managing multiple clusters can be challenging, but rpk’s profiles greatly simplify the process. These profiles enable you to organize cluster addresses, admin hosts, and related details. You can effortlessly create, edit, and switch between profiles using a YAML file, ensuring a streamlined management experience.

Effortless topic management

Developers will appreciate the convenience of the "rpk topic" command. It facilitates the creation, deletion, and configuration of topics. Furthermore, "produce" and "consume" commands streamline data testing processes. And, you can use rpk to trim topics to free up valuable space if one of the topics is being greedy with disk volume.

Cluster security

Security is paramount, and "rpk acl" empowers you to establish the robust security measures that modern organizations require. With this command, you can create credentials, define rules, and manage permissions to fortify your Redpanda cluster's defenses.

Consumer group management

"rpk group" provides a comprehensive view of all connected consumers, enabling you to efficiently manage and adjust offsets as needed.

Template generation

"rpk generate" serves as a valuable tool for generating templates for services surrounding Redpanda. Whether you require Grafana dashboards or Prometheus configurations, this command makes it happen in a snap.

Cloud interaction and BYOC setup

For users of Redpanda Cloud or BYOC deployments, rpk offers a user-friendly interface for logging in, initiating clusters, and managing cloud-related tasks. For those using managed or BYOC Redpanda deployments, rpk offers seamless access with "rpk cloud."

Debugging

In the event of cluster issues, "rpk debug" proves its worth by aggregating essential diagnostic data, helping Redpanda experts swiftly identify and resolve problems.

[CTA_MODULE]

One CLI to rule them all - watch the overview

If you’re more of a visual learner, here’s a 10-min video with a beginner’s overview of rpk and all the neat things you can do with it.

Kickstart your rpk mastery with these handy resources

We like to keep things simple here at Redpanda, so aside from building a powerful streaming data platform that's super easy to use, you can also play with our dev-friendly rpk to easily configure, manage, and tune your Redpanda clusters.

This blog only scratches the surface of rpk’s capabilities, and there’s so much more to learn about this essential resource for navigating the intricacies of Redpanda cluster management and configuration. To make your learning journey smoother, here are a few handy resources to help you master rpk in no time.

As always, if you have questions or get stuck, you can find me in the Redpanda Community on Slack. Happy streaming!

Download the rpk cheat sheet
Get all the must-know rpk commands in one, handy PDF.
No items found.
Graphic for downloading streaming data report
Save Your Spot

Related articles

VIEW ALL POSTS
Redpanda 24.3 creates a query-ready table|stream duality with Apache Iceberg™, launches Native Postgres CDC
Matt Schumpert
&
Mike Broberg
&
Towfiqa Yasmeen
&
December 3, 2024
Text Link
Batch tuning in Redpanda to optimize performance (part 2)
Travis Campbell
&
Paul Wilkinson
&
&
November 26, 2024
Text Link
Batch tuning in Redpanda for optimized performance (part 1)
Travis Campbell
&
Paul Wilkinson
&
&
November 19, 2024
Text Link