The Pulsar command-line tool, pulsarctl
, enables developers to administer resources in a Pulsar cluster. The tool is open-sourced under Apache License v2.0.
Before moving on to the subsequent steps, ensure you review the following requirements.
The pulsarctl
is compatible with the following operating systems and architectures only:
When the pulsarctl
interacts with a Pulsar cluster, it requires network access to its admin service url (i.e., https://pulsar-cluster-domain-name
).
This section describes how to install pulsarctl
on Linux, MAC, and Windows Operating System (OS).
Use this command to install pulsarctl
on the Linux operation system.
Check whether pulsarctl
is installed successfully.
Use this command to install pulsarctl
on the Linux operation system.
Check whether pulsarctl
is installed successfully.
You can use the curl
command or use Homebrew to install pulsarctl
on a Mac.
Use this command to install pulsarctl
on the Mac operation system.
Check whether pulsarctl
is installed successfully.
Add the repository.
Install pulsarctl.
Check whether pulsarctl
is installed successfully.
To install pulsarctl
on the Windows operation system, follow these steps:
Download the latest release package from here.
Extract the pulsarctl .tar.gz
package using Windows Explorer.
Add the pulsarctl
directory to your PATH
.
Check whether pulsarctl
is installed successfully.
This section describes how to configure pulsarctl
.
You can use snctl
to configure a context for pulsarctl
to be used in a StreamNative Cloud cluster.
snctl
configuration.snctl x update-pulsar-config --cluster-name
to add a given cluster as a context to pulsarctl
.
<cluster-name>
.
pulsarctl
contexts, you can use pulsarctl
to interact with the target cluster.You can configure pulsarctl for a Pulsar cluster with different authentication mechanisms.
You can use the following command to configure pulsarctl for a Pulsar cluster that is configured with OAuth2 authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<OAUTH 2.0 ISSUER ENDPOINT>
: The OAuth 2.0 issuer endpoint for the client to connect to./path/to/credentials.json
: The private key credentials file to use.<AUDIENCE>
: The audience to use for OAuth 2.0 authentication.You can use the following command to configure pulsarctl for a Pulsar cluster that is configured with OAuth2 authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<OAUTH 2.0 ISSUER ENDPOINT>
: The OAuth 2.0 issuer endpoint for the client to connect to./path/to/credentials.json
: The private key credentials file to use.<AUDIENCE>
: The audience to use for OAuth 2.0 authentication.You can use the following commands to configure pulsarctl for a Pulsar cluster that is configured with Token authentication.
or
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<API_KEY>
: The API Key to use./path/to/apikey
: The file that contains the API Key.You can use the following commands to configure pulsarctl for a Pulsar cluster that is configured with mTLS authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect./path/to/tls_cert_file
: The TLS cert file to use./path/to/tls_key_file
: The TLS key file to use.The Pulsar command-line tool, pulsarctl
, enables developers to administer resources in a Pulsar cluster. The tool is open-sourced under Apache License v2.0.
Before moving on to the subsequent steps, ensure you review the following requirements.
The pulsarctl
is compatible with the following operating systems and architectures only:
When the pulsarctl
interacts with a Pulsar cluster, it requires network access to its admin service url (i.e., https://pulsar-cluster-domain-name
).
This section describes how to install pulsarctl
on Linux, MAC, and Windows Operating System (OS).
Use this command to install pulsarctl
on the Linux operation system.
Check whether pulsarctl
is installed successfully.
Use this command to install pulsarctl
on the Linux operation system.
Check whether pulsarctl
is installed successfully.
You can use the curl
command or use Homebrew to install pulsarctl
on a Mac.
Use this command to install pulsarctl
on the Mac operation system.
Check whether pulsarctl
is installed successfully.
Add the repository.
Install pulsarctl.
Check whether pulsarctl
is installed successfully.
To install pulsarctl
on the Windows operation system, follow these steps:
Download the latest release package from here.
Extract the pulsarctl .tar.gz
package using Windows Explorer.
Add the pulsarctl
directory to your PATH
.
Check whether pulsarctl
is installed successfully.
This section describes how to configure pulsarctl
.
You can use snctl
to configure a context for pulsarctl
to be used in a StreamNative Cloud cluster.
snctl
configuration.snctl x update-pulsar-config --cluster-name
to add a given cluster as a context to pulsarctl
.
<cluster-name>
.
pulsarctl
contexts, you can use pulsarctl
to interact with the target cluster.You can configure pulsarctl for a Pulsar cluster with different authentication mechanisms.
You can use the following command to configure pulsarctl for a Pulsar cluster that is configured with OAuth2 authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<OAUTH 2.0 ISSUER ENDPOINT>
: The OAuth 2.0 issuer endpoint for the client to connect to./path/to/credentials.json
: The private key credentials file to use.<AUDIENCE>
: The audience to use for OAuth 2.0 authentication.You can use the following command to configure pulsarctl for a Pulsar cluster that is configured with OAuth2 authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<OAUTH 2.0 ISSUER ENDPOINT>
: The OAuth 2.0 issuer endpoint for the client to connect to./path/to/credentials.json
: The private key credentials file to use.<AUDIENCE>
: The audience to use for OAuth 2.0 authentication.You can use the following commands to configure pulsarctl for a Pulsar cluster that is configured with Token authentication.
or
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect.<API_KEY>
: The API Key to use./path/to/apikey
: The file that contains the API Key.You can use the following commands to configure pulsarctl for a Pulsar cluster that is configured with mTLS authentication.
Notes: Please replace the following variables before using the command.
<CONTEXT_NAME>
: The name is used for identifying the cluster.<PULSAR_ADMIN_SERVICE_URL>
: The admin service url of the cluster to connect./path/to/tls_cert_file
: The TLS cert file to use./path/to/tls_key_file
: The TLS key file to use.