Kublrcli is a command-line interface for running commands against Kublr platform. This overview covers kublrcli syntax, describes the command operations, and provides common examples.
You can download the latest stable version of Kublr CLI for Windows, Linux, or macOS.
Use the following syntax to run kublrcli commands from your terminal window:
kublrcli [command] [TYPE] [NAME] [flags]
where command, TYPE
, NAME
, and flags
are:
command
: Specifies the operation that you want to perform on one or more resources, for example create, get, delete.
TYPE
: Specifies the resource type.
NAME
: Specifies the name of the resource. If the name is omitted, details for all resources are displayed, for example kublrcli get cluster.
flags
: Specifies optional flags. For example, you can use the -s
or --space
flags to specify the space in the Kublr.
Flags that you specify from the command line override default values and any corresponding environment variables.
If you need help by command, just run kublrcli help
from the terminal window or add the flag -h
to the command end.
To Log in to a Kublr Control Plane, use the following command:
kublrcli login --api-url http://your-kublr-address
Flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
api-url | The kublr api url. The base URL will be used, if the field is empty | ||
auth-client-id | kublr-ui | The client ID of authentication kublr | |
auth-realm | kublr-ui | The authentication realm | |
auth-url | The authentication url. The base URL will be used, if the field is empty | ||
insecure | false | Trust self-signed SSL certificates | |
url | The base url address of kublr |
Kublr configuration is stored in ~/.kublr/config.json
Please note that the information required for authentication is stored in the file in unencrypted form
Create a resource from a file.
YAML formats are accepted.
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
filename | f | Filename to create the resource |
Display one or many resources
Prints a table of the most important information about the specified resources.
Usage:
kublrcli get (TYPE [NAME]) [(-o|--output=)yaml|wide] [flags]
Available resource types:
RESOURCE | Usage |
---|---|
cluster | Display information about clusters |
secret | Display information about secrets |
space | Display information about spaces |
Available global flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
space | s | default | The kublr space |
Display information about clusters
Usage:
kublrcli get cluster [NAME] [flags]
Flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
all | a | Show all clusters, including deleted ones | |
all-spaces | Display information about resource from all spaces | ||
output | o | Output format. One of: yaml, wide |
Display information about secrets
Usage:
kublrcli get secret [NAME] [flags]
Flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
all-spaces | Display information about resource from all spaces | ||
output | o | Output format. One of: yaml, wide |
Display information about spaces
Usage:
kublrcli get space [NAME] [flags]
Flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
output | o | Output format. One of: yaml, wide |
Delete resources by names
Usage:
kublrcli delete [TYPE] [NAME] [flags]
You can pass many names for a resource, for example:
#Delete secrets in the default space with names "baz" and "foo"
kublrcli delete secret baz foo
Available resource types:
RESOURCE | Usage |
---|---|
cluster | Delete clusters |
secret | Delete secrets |
space | Delete spaces |
Available global flags:
Flag Name | Shorthand | Default | Usage |
---|---|---|---|
space | s | default | The kublr space |