Skip to main content

Create a namespace

Namespaces can be managed via:

  • The namespaces command of the pulsar-admin tool
  • The /admin/v2/namespaces endpoint of the admin REST API
  • The namespaces method of the PulsarAdmin object in the Java API

In this tutorial, we create a namespace called pulsar in the tenant apache. Then we list namespaces of tenant apache to see if the namespace is created successfully.

To create the namespace, use the following command.

bin/pulsar-admin namespaces create apache/pulsar

To verify the namespace, use the following command.

bin/pulsar-admin namespaces list apache

You should see similar output to show the namespace apache/pulsar has been successfully created.

Was this helpful?