dehaze

Installing Space CLI for interacting with Space Cloud resources

Contextlink

Space CLI is heavily inspired from kubectl. If you have ever worked with kubectl before you won’t have much difficulty in understanding space-cli commands.

Installationlink

Run the below commands to download the latest space-cli binary for yous OS.

wget https://storage.googleapis.com/space-cloud/linux/space-cli.zip
wget https://storage.googleapis.com/space-cloud/darwin/space-cli.zip
wget https://storage.googleapis.com/space-cloud/windows/space-cli.zip

Installing specific versionlink

For installing a specific version of space-cli just append the version tag at the end of the url.

For v0.19.8 the linux command will change to:

wget https://storage.googleapis.com/space-cloud/linux/space-cli-v0.19.8.zip

Login to Space Cloudlink

Before executing any operation using space-cli, you need to be authenticated with Space Cloud.

We will use the login command provided by space-cli to do the same.

space-cli login

It will ask for username & password. By default, the username is admin & password is 1234.

If you are not sure about the login credentials, then checkout the config file provided while setting up Space Cloud.

If you are running space cloud on a remote VM, provide the address using --url flag.

space-cli login --url "https://example.com:8080"

Setup Space Cloudlink

To install Space Cloud on a Kubernetes cluster, follow this docs.

Removing Space Cloudlink

For removing Space Cloud from a Kubernetes cluster, use the below command:

space-cli destroy

Backup Space Cloud configlink

Space cloud config is broken down into resources, each resource configures a specific module in Space Cloud.

To view the exhaustive list of resources that space cloud has, run the below command:

space-cli get --help

To backup entire configuration with all resources, run the below command:

space-cli --project <project-name> get all "directory-name"
where directory-name is the name of the folder where all config resources will be stored

Restore Space Cloud configlink

This operation applies the backed up configuration files in the above step.

space-cli apply "file-or-folder-name"
where file-or-folder-name can be the name of the file in which configuration exists or a folder name inside which all the config files exists. In case of a folder all config files will be applied one after the other.

Have a technical question?

Improve the docs!