Kublr CLI

Overview of kublrcli

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.

Get Kublr CLI

You can download the latest stable version of Kublr CLI for Windows, Linux, or macOS.

Syntax

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.

Kublr CLI settings

login

To Log in to a Kublr Control Plane, use the following command:

kublrcli login --api-url http://your-kublr-address

Flags:

Flag NameShorthandDefaultUsage
api-urlThe kublr api url. The base URL will be used, if the field is empty
auth-client-idkublr-uiThe client ID of authentication kublr
auth-realmkublr-uiThe authentication realm
auth-urlThe authentication url. The base URL will be used, if the field is empty
insecurefalseTrust self-signed SSL certificates
urlThe 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

Basic commands

create

Create a resource from a file.

YAML formats are accepted.

Flag NameShorthandDefaultUsage
filenamefFilename to create the resource

get

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:

RESOURCEUsage
clusterDisplay information about clusters
secretDisplay information about secrets
spaceDisplay information about spaces

Available global flags:

Flag NameShorthandDefaultUsage
spacesdefaultThe kublr space

get cluster

Display information about clusters

Usage:

kublrcli get cluster [NAME] [flags]

Flags:

Flag NameShorthandDefaultUsage
allaShow all clusters, including deleted ones
all-spacesDisplay information about resource from all spaces
outputoOutput format. One of: yaml, wide

get secret

Display information about secrets

Usage:

kublrcli get secret [NAME] [flags]

Flags:

Flag NameShorthandDefaultUsage
all-spacesDisplay information about resource from all spaces
outputoOutput format. One of: yaml, wide

get space

Display information about spaces

Usage:

kublrcli get space [NAME] [flags]

Flags:

Flag NameShorthandDefaultUsage
outputoOutput format. One of: yaml, wide

delete

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:

RESOURCEUsage
clusterDelete clusters
secretDelete secrets
spaceDelete spaces

Available global flags:

Flag NameShorthandDefaultUsage
spacesdefaultThe kublr space