Can't get Node JS Edge Modules running under kubernetes

Iain White 146 Reputation points

We have some Edge Modules that we're trying to get running on K8s (k3os), using the edge k8s mini-site as a reference

We've had success with our C# modules - they're running fine, but our NodeJS modules are failing at initialisation.:

Error: connect ECONNREFUSED                                                                                                                             ││     at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1107:14) 

The problem is when the module tries to connect to the iotedged runtime (Using WORKLOADURI which is defined as http://localhost:35001)

It seems that somewhere in nodejs it is resolving that URL, so instead of localhost it's calling

When we exec's on to the module we tried to curl which wasn't responding but it was responding to localhost:35001, so I expect that's what's causing the problem.

Is this an issue that anyone else has encountered? Has anyone managed to get NodeJS modules running on K8s? It seems to me to be failing at the point that every NodeJS module would fail , in the boilerplate code that sets up the client transport - this isn't something that appears to be unique to anything in my module.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
553 questions
0 comments No comments
{count} votes

0 additional answers

Sort by: Most helpful