// 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 an address space

.Procedure

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

. Create the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f standard-address-space.yaml
----
+
The address space is ready for use when `.status.isReady` field is set to `true`.

. Check the status of the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.isReady}
----

. Retrieve console URL:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'console\')].host}
----

// 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 an address space

.Procedure

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

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

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

. Create the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f standard-address-space.yaml
----
+
The address space is ready for use when `.status.isReady` field is set to `true`.

. Check the status of the address space:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.isReady}
----

. Retrieve console URL:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace myspace -o jsonpath={.status.endpointStatuses[?(@.name==\'console\')].host}
----

Add additional steps for creating address space
Add additional steps for creating address space
