[id='iot-creating-project-{context}']
= Creating an IoT project

.Procedure

ifeval::["{cmdcli}" == "oc"]
. Change to a non-admin user:
endif::[]

. Create a _managed_ IoT Project:
+
[options="nowrap",subs="attributes"]
----
ifeval::["{cmdcli}" == "oc"]
{cmdcli} new-project myapp
endif::[]
ifeval::["{cmdcli}" == "kubectl"]
{cmdcli} create namespace myapp
kubectl config set-context $(kubectl config current-context) --namespace=myapp
endif::[]
{cmdcli} create -f install/components/iot/examples/iot-project-managed.yaml
----

. Wait for the resources to be ready:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} get addressspace -w
{cmdcli} get iotproject -w
----

. Create a messaging consumer user:
+
[options="nowrap",subs="attributes"]
----
{cmdcli} create -f install/components/iot/examples/iot-user.yaml
----
