GETTING STARTED

This section contains the most basic commands for getting a workload running on your cluster.


create

Create a cluster using the data in cluster.json.

snctl create -f ./cluster.json

Create a cluster based on the JSON passed to stdin.

cat cluster.json | snctl create -f -

Edit the data in cluster.yaml in JSON and then create the resource using the edited data.

snctl create -f cluster.yaml --edit -o json

Create a resource from a file or from stdin.

JSON and YAML formats are accepted.

Usage

$ create -f FILENAME

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
edit false Edit the API resource before creating.
field-manager snctl-create Name of the manager used to track field ownership.
filename f [] Filename, directory, or URL to files to use to create the resource
kustomize k Process the kustomization directory. This flag can't be used together with -f or -R.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
raw Raw URI to POST to the server. Use the transport specified by the config file.
recursive R false Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
save-config false If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
selector l Selector (label query) to filter on, supporting '=', '==', and '!='.(e.g. -l key1=value1,key2=value2).
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
validate true If true, use a schema to validate the input before sending it
windows-line-endings false Only relevant if --edit=true. Defaults to the line ending native to your platform.

apikey

Create an APIKey

snctl create apikey APIKEY_NAME --instance-name INSTANCE_NAME --service-account-name SERVICE_ACCOUNT_NAME --expiration-time EXPIRE_TIME --description DESCRIPTION

Create a APIKey.

Usage

$ apikey [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
description The description of APIKey
dry-run false If true, only print the object that would be sent, without sending it.
expiration-time The expiration time of an APIKey, the value is time in days to expire to with --expiration-time (or minutes, hours, days eg: 10m, 3h, 2d)or a time string value with format like '2006-01-02T15:04:05Z'or 0 means never expire.
field-manager snctl-create Name of the manager used to track field ownership.
instance-name The instance name of APIKey
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
service-account-name The service account name of APIKey
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

cloudconnection

Create an aws Cloud Connection

snctl create cloudconnection CLOUD_CONNECTION_NAME --type aws --account-id ACCOUNT_ID

Create a Cloud Connection.

Usage

$ cloudconnection [NAME]

Flags

Name Shorthand Default Usage
account-id The account id of aws cloud connection.
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
client-id The client id of azure cloud connection
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
project-id The project id of gcp cloud connection
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
subscription-id The subscription id of azure cloud connection
support-client-id The support client id of azure cloud connection
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
tenant-id The tenant id of azure cloud connection
type The type of cloud connection type, allowed: aws, gcp or azure.

cloudenvironment

Create an Cloud Environment

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--network-cidr 10.10.0.0/16

Create an Azure Cloud Environment

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region RESOURCE_GROUP_NAME \
--network-cidr 10.10.0.0/16

Create an zonal Cloud Environment

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--zone ZONE \
--network-cidr 10.10.0.0/16

Create BYOC Pro Cloud Environment with customer-managed dns

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--network-cidr 10.10.0.0/16 \
--dns-id DNS_ID \
--dns-name DNS_NAME

Create an Cloud Environment with public gateway

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--default-gateway-access public \
--network-cidr 10.10.0.0/16

Create an Cloud Environment with private gateway

snctl create cloudenvironment --cloud-connection-name CLOUD_CONNECTION_NAME \
--region REGION \
--default-gateway-access private \
--default-gateway-allowed-ids WHITE_LIST_ID1 \
--default-gateway-allowed-ids WHITE_LIST_ID2 \
--network-cidr 10.10.0.0/16

Create a Cloud Environment.

Usage

$ cloudenvironment [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
cloud-connection-name The name of cloud connection name.
default-gateway-access public The access type of the default gateway, this will determine accessibility of Pulsar endpoint. It can be one of public, private, the default is public.
default-gateway-allowed-ids [] The allowed ids of the default gateway, only can be set when default gateway access is private.
dns-id The DNS ID of Cloud Environment
dns-name The DNS name of Cloud Environment
dry-run false If true, only print the object that would be sent, without sending it.
environment-type The environment type of Cloud Environment, it can be one of dev, test, staging, production, poc, qa, acc, the default is production
field-manager snctl-create Name of the manager used to track field ownership.
network-cidr The network cidr of Cloud Environment
network-id The network id of Cloud Environment
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
region The region of Cloud Environment. The resource group name should be provided if the cloud connection type is Azure.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
subnet-cidr The subnet cidr of Cloud Environment
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
zone The zone of Cloud Environment, this underlying Pool Member will be zonal if this is configured.

identitypool

Create a IdentityPool for cloud

snctl create identitypool POOL_NAME --auth-type AUTH_TYPE --provider-name PROVIDER_NAME --expression Expression --description POOL_DESCRIPTION

Create a identitypool for cloud.

Usage

$ identitypool [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
auth-type token the auth type for the identity pool
description the identity pool description
dry-run false If true, only print the object that would be sent, without sending it.
expression the filter expression for the identity pool
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
provider-name the provider name
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

oidcprovider

Create a OIDCProvider for cloud

snctl create oidcprovider PROVIDER_NAME --discovery_url DISCOVERY_URL --description PROVIDER_DESCRIPTION

Create a oidcprovider for cloud.

Usage

$ oidcprovider [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
description the oidcprovider description
discovery-url the discovery url of the oidc provider
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

pulsarcluster

Create a Pulsar cluster in a Pulsar instance with the specified node type and location.

snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME --node-type NODE_TYPE --location LOCATION
snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME --node-type NODE_TYPE --pool-member-name POOL_MEMBER_NAME

Create a Pulsar cluster with multiple Pulsar gateways.

snctl create pulsarcluster PULSAR_CLUSTER_NAME --instance-name INSTANCE-NAME \
--node-type NODE_TYPE --pool-member-name POOL_MEMBER_NAME \
--gateways GATEWAY1 --gateways GATEWAY2

Create a Pulsar cluster.

Usage

$ pulsarcluster [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
bookie-replicas 3 the replicas of the bookkeeper
broker-replicas 2 the replicas of the broker
compute-unit 0.5 compute unit, 1 compute unit is 2 cpu and 8gb memory
display-name the display name of the pulsar cluster
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
gateways [] the pulsar gateways used to expose the pulsar cluster endpoint
instance-name The name of the pulsar instance.
location The location to deploy the cluster.
node-type the node type deprecated please use compute-unit and storage-unit
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
pool-member-name The name of the pool member, only can be specified by BYOC users.
release-channel rapid the release channel to subscribe to, it can be one of lts or rapid, default rapid
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
storage-unit 0.5 storage unit, 1 storage unit is 2 cpu and 8gb memory
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

pulsargateway

Create a Pulsar gateway with public access

snctl create pulsargateway NAME --access public --pool-member-name POOL_MEMBER_NAME

Create a Pulsar gateway with private access on AWS Pool member

snctl create pulsargateway NAME --access private \
--allowed-ids arn:aws:iam::1234567890:root \
--pool-member-name POOL_MEMBER_NAME

Create a Pulsar gateway with private access on GCP Pool member

snctl create pulsargateway NAME --access private \
--allowed-ids PROJECT_NAME \
--pool-member-name POOL_MEMBER_NAME

Create a Pulsar gateway with private access on Azure Pool member

snctl create pulsargateway NAME --access private \
--allowed-ids SUBSCRIPTION_ID \
--pool-member-name POOL_MEMBER_NAME

Create a Pulsar gateway to expose Pulsar service as public or private endpoint.

Usage

$ pulsargateway [NAME]

Flags

Name Shorthand Default Usage
access public Access type
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
allowed-ids [] Ids allowed to consume the private service, only can be set when access is private
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
pool-member-name Pool member name
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

pulsarinstance

Create a standard zonal Pulsar instance.

snctl create pulsarinstance PULSAR_INSTANCE_NAME

Create a standard regional Pulsar instance.

snctl create pulsarinstance PULSAR_INSTANCE_NAME --availability-mode regional

Create a Pulsar instance on a named infrastructure pool.

snctl create pulsarinstance PULSAR_INSTANCE_NAME --pool streamnative/shared-aws

Create a serverless Pulsar instance.

snctl create pulsarinstance PULSAR_INSTANCE_NAME --pool streamnative/shared-aws --type serverless

Create a Pulsar instance with the specific name.

Usage

$ pulsarinstance [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
availability-mode zonal The availability mode, supporting 'zonal' and 'regional'.
dry-run false If true, only print the object that would be sent, without sending it.
engine The engine of the Pulsar instance, supported engine type 'ursa' 'classic'.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
pool The infrastructure pool to use. By default, a pool is selected automatically.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
type The type of the Pulsar instance. By default, it is 'serverless', supported type 'serverless' 'dedicated', 'byoc' and 'byoc-pro'.

role

Create a role for cloud

snctl create role ROLE_NAME --permissions PERMISSIONS

Create a role for cloud.

Usage

$ role [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
permissions [] Permissions
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

rolebinding

Create a role binding for a service account

snctl create rolebinding ROLE_BINDING_NAME --role ROLE_NAME --serviceaccount SERVICE_ACCOUNT_NAME

Create a role binding for a user or service account.

Usage

$ rolebinding [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
cel the CEL(common expression language) format condition
clusterrole The predefined cluster role bound to the user or service account.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
identitypool [] IdentityPool(s) to which the role is bound.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
role The role bound to the user or service account.
serviceaccount [] service account(s) to which the role is bound.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
user [] User(s) to which the role is bound.

serviceaccount

Create a service account with the specified name.

snctl create serviceaccount SERVICE_ACCOUNT_NAME

Create a service account with the given file.

snctl create serviceaccount -f serviceaccount.yaml

Create a service account.

Usage

$ serviceaccount [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

serviceaccountbinding

Create a service account binding with the specified service account and poolmember name.

snctl create serviceaccountbinding SERVICE_ACCOUNT_BINDING_NAME --service-account-name NAME --pool-member streamnative/test

Create a service account binding with the specific name.

Usage

$ serviceaccountbinding [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
pool-member The poolmember name.
service-account-name The service account name.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

subscription

Setup a subscription to StreamNative Cloud.

snctl create subscription [OFFER] -n [ORG-NAME]

Setup a subscription to StreamNative Cloud.

Usage

$ subscription [OFFER]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-create Name of the manager used to track field ownership.
offer The offer name.
offer-type public The offer type (public or private).
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

user

snctl create user USER_NAME --email USER_EMAIL

Create a user resource to register a user as a member of an organization.

Usage

$ user [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
email Email address of the user.
field-manager snctl-create Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

apply

Apply the configuration in pulsarcluster.yaml to a pulsarcluster.

snctl apply -f ./pulsarcluster.yaml

Apply a configuration to a resource by the filename or stdin. The resource name must be specified. This resource will be created if it does not exist yet.

JSON and YAML formats are accepted.

Usage

$ apply (-f FILENAME | -k DIRECTORY)

Flags

Name Shorthand Default Usage
filename f [] that contains the configuration to apply

describe

Print the detailed description of the Pulsar cluster

snctl describe pulsarcluster PULSAR_CLUSTER_NAME

Show details of a specific resource.

Usage

$ describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME)


auth

Usage

$ auth


activate-service-account

Activate a service account by supplying a key file.

snctl auth activate-service-account --key-file serviceaccount.json

Activate a service account by supplying its credentials.

Usage

$ activate-service-account

Flags

Name Shorthand Default Usage
key-file f Path to the private key file.

export-service-account

Export a service account to a file.

snctl auth export-service-account SERVICE_ACCOUNT_NAME --key-file serviceaccount.json

Export the service account credentials.

Usage

$ export-service-account [NAME]

Flags

Name Shorthand Default Usage
key-file f Path to the private key file.
no-wait false Skip waiting for service account readiness.

get-token

Get the pulsar instance access token with the login user.

snctl auth get-token PULSAR_INSTANCE_NAME --login

Get an access token for a Pulsar instance.

Usage

$ get-token [INSTANCE]

Flags

Name Shorthand Default Usage
key-file f Path to the private key file
login false Adopt an interactive login.
skip-open false The Web browser are not opened automatically.

login

Log in to the StreamNative Cloud.

snctl auth login

Log in to the StreamNative Cloud and skip opening the login window.

snctl auth login --skip-open

Authorize the tool to operate on behalf of a user.

Usage

$ login

Flags

Name Shorthand Default Usage
no-refresh false The refresh tokens cannot be used.
skip-open false The Web browser are not opened automatically.

logout

Log out from the current account and clear the activation.

snctl auth logout

Usage

$ logout


whoami

Display the name of login user or service account.

snctl auth whoami

Display the logged-in user or service account.

Usage

$ whoami


config

Usage

$ config


init

Initialize the StreamNative cloud CLI configuration with default settings.

snctl config init

Usage

$ init


set

Set the default namespace to be used in the CLI commands

snctl config set --namespace streamnative

Usage

$ set

Flags

Name Shorthand Default Usage
audience Set the OAuth 2.0 audience identifier for the StreamNative Cloud API.
cacert Set the CA certificate for StreamNative Cloud API (PEM, base64).
client-id Set the OAuth 2.0 client identifier for the StreamNative Cloud CLI.
insecure-skip-tls-verify true Indicate whether to skip TLS verification.
issuer-endpoint Set the OAuth 2.0 issuer endpoint.
logs-cluster Set the default cluster to be used in logs CLI commands.
logs-instance Set the default instance to be used in logs CLI commands.
logs-service-url Set the service URL to be used in logs CLI commands.
namespace n Set the default namespace to be used in CLI commands.
server s Set the service URL for StreamNative Cloud API.

delete

Delete a Pulsar cluster using the type and name specified in the 'pulsarcluster.yaml' file.

snctl delete -f ./pulsarcluster.yaml

Delete a resource by the resource name. The following example deletes a Pulsar instance.

snctl delete pulsarinstance PULSAR_INSTANCE_NAME

Delete resources by filenames, stdin, resources and names.

Usage

$ delete ([-f FILENAME] | [-k DIRECTORY] | TYPE [(NAME | -l label | --all)])

Flags

Name Shorthand Default Usage
all false Delete all resources, in the namespace of the specified resource types.
all-namespaces A false If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
cascade background Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to background.
dry-run none Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.
field-selector Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.
filename f [] containing the resource to delete.
force false If true, immediately remove resources from API and bypass graceful deletion. Note that immediate deletion of some resources may result in inconsistency or data loss and requires confirmation.
grace-period -1 Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion).
ignore-not-found false Treat "resource not found" as a successful delete. Defaults to "true" when --all is specified.
kustomize k Process a kustomization directory. This flag can't be used together with -f or -R.
now false If true, resources are signaled for immediate shutdown (same as --grace-period=1).
output o Output mode. Use "-o name" for shorter output (resource/name).
raw Raw URI to DELETE to the server. Uses the transport specified by the kubeconfig file.
recursive R false Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
selector l Selector (label query) to filter on.
timeout 0s The length of time to wait before giving up on a delete, zero means determine a timeout from the size of the object
wait true If true, wait for resources to be gone before returning. This waits for finalizers.

get

Get all the created pulsar clusters.

snctl get pulsarcluster

Get all resources of the specified type.

Usage

$ get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns-file|custom-columns|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags]

Flags

Name Shorthand Default Usage
all-namespaces A false If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace.
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
chunk-size 500 Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is beta and may change in the future.
field-selector Selector (field query) to filter on, supports '=', '==', and '!='.(e.g. --field-selector key1=value1,key2=value2). The server only supports a limited number of field queries per type.
filename f [] Filename, directory, or URL to files identifying the resource to get from a server.
ignore-not-found false If the requested object does not exist the command will return exit code 0.
kustomize k Process the kustomization directory. This flag can't be used together with -f or -R.
label-columns L [] Accepts a comma separated list of labels that are going to be presented as columns. Names are case-sensitive. You can also use multiple flag options like -L label1 -L label2...
no-headers false When using the default or custom-column output format, don't print headers (default print headers).
output o Output format. One of: json|yaml|wide|name|custom-columns=...|custom-columns-file=...|go-template=...|go-template-file=...|jsonpath=...|jsonpath-file=...
output-watch-events false Output watch event objects when --watch or --watch-only is used. Existing objects are output as initial ADDED events.
raw Raw URI to request from the server. Uses the transport specified by the kubeconfig file.
recursive R false Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
selector l Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
server-print true If true, have the server return the appropriate table output. Supports extension APIs and CRDs.
show-kind false If present, list the resource type for the requested object(s).
show-labels false When printing, show all labels as the last column (default hide labels column)
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
sort-by If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
watch w false After listing/getting the requested object, watch for changes.
watch-only false Watch for changes to the requested object(s), without listing/getting first.

api-resources

List all cloud API resources

snctl api-resource

Get all available API resources in snctl.

Usage

$ api-resources


version

Print the client and server versions for the current context

snctl version

Print the client and server version information.

Usage

$ version

Flags

Name Shorthand Default Usage
client false Client version (No server version is required).
output o The output is in 'yaml' file or the 'json' format.
short false Print the version number only.

x

Usage

$ x


update-pulsar-config

Add a cluster to the Pulsar client configuration file.

snctl x update-pulsar-config --cluster-name <cluster>

Usage

$ update-pulsar-config

Flags

Name Shorthand Default Usage
cluster-name The name of the pulsar cluster.
context-name The name of the context to create.
skip-use-context false If true, the current context is not changed.

logs

Display the logs of pulsar cluster

snctl logs \
-o organization \
-i instance \
-c cluster \
-p sink \
-f \
--since 10m \
--name logs \
--pulsar-tenant public \
--pulsar-namespace default \
--previous

Display the logs of pulsar cluster, the parameters service-url, organization, instance, cluster could be set by cmd snctl config set, for example, set log service-url snctl config set --log-service-url http://localhost:8080

Usage

$ logs

Flags

Name Shorthand Default Usage
cluster c Cluster Name
component p function Name of function/sink/source
follow f false Continuous get logs without auto exit
insecure-skip-tls-verify-backend k false Skip verifying the identity.
instance i Instance Name
key-file Path to the private key file
name Component Name
organization o Organization Name
previous false Browse the log with mode previous
pulsar-namespace Pulsar Namespace
pulsar-tenant Pulsar Tenant
replica-id r -1 See which replica of which function, sink, source
service-url u Log Service URL
since Since time of logs, numbers end with s|m|h, for example one hour ago: 1h
size s 20 Logs tail size
timestamp Start timestamp of logs, for example: 1662430984225

revoke

Usage

$ revoke


apikey

Revoke an APIKey

snctl revoke apikey APIKEY_NAME

Revoke a APIKey.

Usage

$ apikey [NAME]

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run false If true, only print the object that would be sent, without sending it.
field-manager snctl-revoke Name of the manager used to track field ownership.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].

edit

Edit the resource named 'rolebinding'

snctl edit rolebinding

Use an alternative editor

KUBE_EDITOR="nano" kubectl edit rolebinding

Edit a resource from the default editor.

The edit command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources.

Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group.

The default format is YAML. To edit in JSON, specify "-o json".

The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used.

In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version.

Usage

$ edit (RESOURCE/NAME | -f FILENAME)

Flags

Name Shorthand Default Usage
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
field-manager kubectl-edit Name of the manager used to track field ownership.
filename f [] Filename, directory, or URL to files to use to edit the resource
kustomize k Process the kustomization directory. This flag can't be used together with -f or -R.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
output-patch false Output the patch if the resource is edited.
recursive R false Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
save-config false If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
validate true If true, use a schema to validate the input before sending it
windows-line-endings false Defaults to the line ending native to your platform.

set

Configure StreamNative Cloud resources.

These commands help you make changes to existing StreamNative Cloud resources.

Usage

$ set SUBCOMMAND


subject

Update a role binding for serviceaccount1

kubectl set subject rolebinding admin --serviceaccount=serviceaccount1

Update a role binding for user1, user2

kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1

Update the user, service account, or identity pool in a StreamNative Cloud role binding.

Usage

$ subject TYPE NAME [--user=username] [--identitypool=identitypoolname] [--serviceaccount=serviceaccountname] [--dry-run=server|client|none] [--remove-extra-subjects]

Flags

Name Shorthand Default Usage
all false Select all resources, in the namespace of the specified resource types
allow-missing-template-keys true If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.
dry-run none Must be "none", "server", or "client". If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.
field-manager snctl-set Name of the manager used to track field ownership.
filename f [] Filename, directory, or URL to files the resource to update the subjects
identitypool [] IdentityPool(s) to which the role is bound.
kustomize k Process the kustomization directory. This flag can't be used together with -f or -R.
local false If true, set subject will NOT contact api-server but run locally.
output o Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
recursive R false Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
remove-extra-subjects false If true, removes extra subjects from the role binding
selector l Selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)
serviceaccount [] Service accounts to bind to the role
show-managed-fields false If true, keep the managedFields when printing objects in JSON or YAML format.
template Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
user [] Usernames to bind to the role

usage-data

Usage

$ usage-data get -h


get

Usage

$ get


get local

Usage

$ local

Flags

Name Shorthand Default Usage
auth-params auth params
auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken auth plugin
csv-file-path o the path to the exported csv file. If not set, it will not be saved as a CSV file.
url u pulsar://localhost:6650 Pulsar service URL

get sncloud

Usage

$ sncloud

Flags

Name Shorthand Default Usage
auth-params auth params
auth-plugin org.apache.pulsar.client.impl.auth.AuthenticationToken auth plugin
csv-file-path o the path to the exported csv file. If not set, it will not be saved as a CSV file.
org cloud organization ID
pm pool member ID
url u pulsar+ssl://pc-9293889f.aws-use2-production-snci-pool-kid.streamnative.aws.snio.cloud:6651 Pulsar service URL