How to manage spaces

See also: Space

Juju users are able to create, view, rename, or delete spaces.


Add a space

Spaces are created with the add-space command. The following example creates a new space called db-space and associates the subnet with it:

juju add-space db-space
added space "db-space" with subnets

See more: juju add-space

Reload spaces

To reload spaces, along with their subnets, use the reload-spaces command:

juju reload-spaces

This will show you any new spaces (whether added via add-space or directly on the provider end), or any new subnets of an existing space.

See more: juju reload-spaces

This command is especially relevant for a MAAS cloud. There, you cannot add a space via juju add-space. Rather, you must add it directly using the MAAS UI/CLI and then run juju reload-spaces to make it known to Juju.

View the available spaces

The spaces known to juju can be viewed with the spaces command, as follows:

$ juju spaces
Name   Space ID  Subnets
alpha  0

See more: juju spaces

View details about a space

To view details about a space, run the show-space command:

juju show-space

The command also allows you to specify a model to operate in, an output format, etc.

See more: juju show-space

Rename a space

To rename a space db-space to public-space, do:

$ juju rename-space db-space public-space
renamed space "db-space" to "public-space"

Spaces can also be renamed during controller configuration, via the juju-ha-space and juju-mgmt-space key, or during model configuration, via the default-space key.

See more: juju rename-space

Remove a space

You can delete a space using the remove-space command.

$ juju remove-space public-space
removed space "public-space"

Deleting a space will cause any subnets in it to move back to the alpha space. See How to manage subnets.

See more: juju remove-space

Contributors: @manadart, @tmihoc

This page is missing these commands:


You may want to include a bug citation for reload-spaces (LP #1730747).