Azure IoT Edge with proxy and Certificate

Gibin Francis
1 min readMar 16, 2022

--

In some situations we may need the install certificates on the Azure IoT edge agent and edge hub to get those module to communicate to the cloud via proxy.

In such situation we may need to use custom edge agent and edge hub instead of the one from Microsoft. For that we can create a custom docker image with below content from the base image with certificate.

FROM mcr.microsoft.com/azureiotedge-agent:1.1.0
USER root
COPY youCcertificateName.crt /tmp
RUN cat /tmp/youCcertificateName.crt >> /etc/ssl/certs/youCcertificateName.crt

in the similar way we can crate edge hub also

FROM mcr.microsoft.com/azureiotedge-hub:1.1.0
USER root
COPY youCcertificateName.crt /tmp
RUN cat /tmp/youCcertificateName.crt >> /etc/ssl/certs/youCcertificateName.crt

and use these images the edge configuration to run the modules communicate with certificate. Along with the same we need to add below environment variables on the modules, in the deployment manifest

key : https_proxy
value : your proxy ip
key : http_proxy
value : your proxy ip

Now you are good to communicate via proxy with certificate from your edge modules. Happy coding.

--

--

Gibin Francis
Gibin Francis

Written by Gibin Francis

Technical guy interested in MIcrosoft Technologies, IoT, Azure, Docker, UI framework, and more

No responses yet