// Module included in the following assemblies:
//
// assembly-configure-address-spaces-addresses-cli-kube.adoc
// assembly-configure-address-spaces-addresses-cli-oc.adoc

[id='create-address-space-cli-{context}']
= Creating address spaces using the command line

In {ProductName}, you create address spaces using standard command-line tools.

.Procedure

ifeval::["{cmdcli}" == "oc"]
. Log in as a messaging tenant:
+
[subs="attributes",options="nowrap"]
----
{cmdcli} login -u developer
----

. Create the project for the messaging application:
+
[subs="attributes",options="nowrap"]
----
{cmdcli} new-project myapp
----
endif::[]

. Create an address space definition:
+
[source,yaml,options="nowrap"]
----
include::../common/standard-address-space.yaml[]
----

. Create the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f standard-address-space.yaml
----

. Check the status of the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.isReady}
----
+
The address space is ready for use when the previous command outputs `true`.

