Use IoT Edge module to run a Kubernetes stateless application on your Azure Stack Edge Pro GPU device

APPLIES TO: Yes for Pro GPU SKUAzure Stack Edge Pro - GPUYes for Pro R SKUAzure Stack Edge Pro RYes for Mini R SKUAzure Stack Edge Mini R                  

This article describes how you can use an IoT Edge module to deploy a stateless application on your Azure Stack Edge Pro device.

To deploy the stateless application, you'll take the following steps:

  • Ensure that prerequisites are completed before you deploy an IoT Edge module.
  • Add an IoT Edge module to access compute network on your Azure Stack Edge Pro.
  • Verify the module can access the enabled network interface.

In this how-to article, you'll use a webserver app module to demonstrate the scenario.


Before you begin, you'll need:

Add webserver app module

Take the following steps to add a webserver app module on your Azure Stack Edge Pro device.

  1. In the IoT Hub resource associated with your device, go to Automatic Device Management > IoT Edge.

  2. Select and click the IoT Edge device associated with your Azure Stack Edge Pro device.

    Select IoT Edge device

  3. Select Set modules. On Set modules on device, select + Add and then select IoT Edge Module.

    Select IoT Edge module

  4. In the Add IoT Edge module:

    1. Specify a Name for your webserver app module that you want to deploy.

    2. Under Module settings tab, provide an Image URI for your module image. A module matching the provided name and tags is retrieved. In this case, nginx:stable will pull a stable nginx image (tagged as stable) from the public Docker repository.

      Add IoT Edge module

    3. In the Container Create Options tab, paste the following sample code:

          "HostConfig": {
              "PortBindings": {
                  "80/tcp": [
                          "HostPort": "8080"

      This configuration lets you access the module using the compute network IP over http on TCP port 8080 (with the default webserver port being 80). Select Add.

      Specify port information in IoT Edge custom module blade

    4. Select Review + create. Review the module details and select Create.

Verify module access

  1. Verify the module is successfully deployed and is running. On the Modules tab, the runtime status of the module should be running.

    Verify module status is running

  2. To get the external endpoint of the webserver app, access the Kubernetes dashboard.

  3. In the left-pane of the dashboard, filter by iotedge namespace. Go to Discovery and Load balancing > Services. Under the list of services listed, locate the external endpoint for the webserver app module.

    Connect to webserver app at external endpoint

  4. Select the external endpoint to open a new browser window.

    You should see that the webserver app is running.

    Verify connection to module over specified port

Next steps

  • Learn how to Expose stateful application via an IoT Edge module.