// 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-plans-cli-{context}']
= Creating address plans

.Procedure

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

. Select the project where {ProductName} is installed:
+
[subs="+quotes,attributes",options="nowrap"]
----
{cmdcli} project _{ProductNamespace}_
----
endif::[]

. Create an address plan definition:
+
[source,yaml,options="nowrap"]
----
apiVersion: admin.enmasse.io/v1beta2
kind: AddressPlan
metadata:
  name: small-anycast
  labels:
    app: enmasse
spec:
  addressType: anycast
  resources:
    router: 0.2
----

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

. Verify that schema has been updated and contains the plan:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspaceschema standard -o yaml
----

