
Red Hat OpenShift Application Services Cheat Sheet

Get the cheat sheet
About
The Red Hat OpenShift Application Services command-line interface (CLI) rhoas lets you manage OpenShift Streams for Apache Kafka from a terminal.
This cheat sheet covers the commands you need to:
- Manage and interact with Apache Kafka instances, topics, Consumer Groups, and Access Control Lists
- Manage and interact with your Service Registry instances
- Manage service accounts, which let you connect your applications to a Kafka instance
- Generate configuration files for the service context to connect with to be used with various tools and platforms
With Red Hat Developer cheat sheets, you get essential information right at your fingertips so you can work faster and smarter. Easily learn new technologies and coding concepts and quickly find the answers you need.
Excerpt
Login commands
rhoas login
Log in to
rhoas.
rhoas logout
Log out of rhoas.
Apache Kafka management
Manage and interact with Kafka instances, Kafka topics, Consumer Groups, and Access Control Lists (ACL). Each Kafka service includes a full Apache Kafka cluster, bootstrap servers, and the configurations needed to connect to producer and consumer services.
rhoas kafka create --name my-kafka-instance
Create a Kafka instance.
rhoas kafka describe --name my-kafka-instance
View configuration details of a Kafka instance.
rhoas kafka list
Update configuration details for a Kafka instance.
rhoas kafka describe --name my-kafka-instance.
Set the current Kafka instance.
rhoas kafka delete --name my-kafka-instance
Delete a Kafka instance.
Apache Kafka topic management
This section covers commands for managing Kafka topics in the current Kafka instance.
rhoas kafka topic list
List all topics.
rhoas kafka topic create --name my-topic
Create a Kafka topic.
rhoas kafka topic describe --name my-topic
Describe a Kafka topic.
rhoas kafka topic update --name my-topic --retention-ms -1
Update configuration details for a Kafka topic.
rhoas kafka topic consume --name my-topic --partition 0 --wait
Consume messages from a Kafka topic.
rhoas kafka topic produce --name my-topic --file="message.json"
Produce a new message to a Kafka topic.
rhoas kafka topic delete --name my-topic
Delete a Kafka topic.