Share via

How to deploy a custom workload to azure iot operations and connect to it to see the data?

Bhagwan Gaikwad, Payal 0 Reputation points
2024-07-18T09:32:42.4633333+00:00

Hi, I have azure iot operations deployed on my machine using azure arc-kubernetes, I have simulated opc module deployed and running on it. Using Azure IoT operations UI I have created assets and tags and see the data flowing from opc endpoint.

Now I have a simulator created in c#, I have its docker image stored in azure container registry. I want to deploy this container as a workload on arc and create an asset endpoint for it and see data flowing in, I don't see any tutorial for this, please help.

I have an idea how this should work, but I am confused with asset endpoint, does my simulator needs to publish data somewhere?

Azure Arc
Azure Arc

A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.

Azure IoT Operations
Azure IoT Operations

Azure IoT Operations is a set of modular services enabled by Azure Arc.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Amira Bedhiafi 41,386 Reputation points MVP Volunteer Moderator
    2026-04-21T18:51:25.5066667+00:00

    Hello Bhagawan !

    Thank you for posting on MS Learn Q&A.

    What you deploy and what Azure IoT Operations can ingest are two separate things.

    Your C# container can absolutely run on the same Arc enabled Kubernetes cluster as Azure IoT Operations because Azure IoT Operations is Kubernetes native and is designed to integrate customer workloads into the platform. But simply running a pod on the cluster does not make it an Azure IoT Operations asset by itself.

    https://learn.microsoft.com/en-us/azure/iot-operations/overview-iot-operations

    https://learn.microsoft.com/en-us/azure/iot-operations/develop-edge-apps/overview-iot-operations-development

    You can use your usual Kubernetes methodsuch as a deployment pointing to the image in ACR. There is no special Azure IoT Operations workload deployment mechanism required just to run the app. Azure IoT Operations runs on the Arc enabled cluster and customer apps can run alongside it.

    The next part I think is the part you are missing because if your simulator is just a custom C# app with no protocol surface Azure IoT Operations has nothing to connect to. The simulator must publish or expose data through one of these patterns:

    • MQTT: easiest option for a custom app
    • OPC UA: if your simulator can act as an OPC UA server
    • custom connector: if it uses a proprietary protocol and you want full asset modeling in the UI

    I also thinl that the best option in your case is to publish from the simulator to MQTT because Azure IoT Operations includes a built in local MQTT broke and apps can publish and subscribe to it, and data flows can use it as a source or destination.

    Also, Azure IoT Operations has an MQTT connector specifically for modeling MQTT endpoints as assets and it will help you to connect either to an external MQTT broker or to the built in MQTT broker in Azure IoT Operations since It detects topic paths, creates discovered asset resources, and forwards subscribed data to the unified namespace topics you configure.

    About your question regarding if the simulator needs to publish data somewhere it is yes but to something that Azure IoT Ops can ingest.

    For a custom simulator, that usually means:

    • publish MQTT messages to the local AIO broker
    • expose an OPC UA server endpoint
    • implement a custom connector if the protocol is proprietary

    If your simulator does not publish or expose data through one of those supported patterns, creating an asset endpoint alone won’t help because the asset definitions are configuration and they are not a transport by themselves.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.