Module with Websocket or Kestrel Server not deploying to Kubernetes Cluster
See original GitHub issueI have managed to setup an instance of AKS, with namespaces linking to my Edge Devices. I deploy the modules I require and the majority of them deploy without issue. However, the two modules I have created which run a websocket server or a Kestrel server will not deploy.
Expected Behavior
The Edge Agent should pull the module, create the service, pod and any other items it needs to setup the module. The module should then be deployed and clients able to connect to it.
Current Behavior
The Edge Agent appears to try to pull the module from the repository, create a service and then throws the following exception:
2019-07-25 12:55:49.702 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Core.Agent] - Edge agent created.
2019-07-25 12:55:49.713 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Core.Agent] - Starting reconcile operation
2019-07-25 12:55:49.744 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Core.Agent] - Getting edge agent config...
2019-07-25 12:55:49.843 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator] - Deployment 'iothub1.azure-devices.net-edgedevice1', status'Added'
2019-07-25 12:55:49.857 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator] - Expected a valid '' creation string in k8s Object 'edgeagent'.
2019-07-25 12:55:50.004 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator] - Creating service object 'websocketmodule'
2019-07-25 12:55:50.012 +00:00 [DBG] [Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator] - Creating edge deployment 'websocketmodule'
2019-07-25 12:55:50.013 +00:00 [INF] [Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator] - Creating service websocketmodule
Unhandled Exception: Microsoft.Rest.HttpOperationException: Operation returned an invalid status code 'UnprocessableEntity'
at k8s.Kubernetes.CreateNamespacedServiceWithHttpMessagesAsync(V1Service body, String namespaceParameter, String pretty, Dictionary`2 customHeaders, CancellationToken cancellationToken)
at k8s.KubernetesExtensions.CreateNamespacedServiceAsync(IKubernetes operations, V1Service body, String namespaceParameter, String pretty, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Edge.Agent.Kubernetes.EdgeOperator.ManageDeployments(V1ServiceList currentServices, V1DeploymentList currentDeployments, EdgeDeploymentDefinition customObject) in /home/vsts/work/1/s/edge-agent/src/Microsoft.Azure.Devices.Edge.Agent.Kubernetes/EdgeOperator.cs:line 732
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ThreadPoolWorkQueue.Dispatch()
Steps to Reproduce
- Install IoTEdge onto Kubernetes cluster using edgek8s/edge-kubernetes
- Create namespace linked to Edge Device
- Add modules to be deployed
- Add websocket or Kestrel module
Context (Environment)
Device (Host) Operating System
Ubuntu 18.04
Architecture
amd64
Container Operating System
Linux containers - traefik:v1.7-alpine
Runtime Versions
edge-kubernetes-0.1.6
iotedged
iotedged:0.1.0-alpha
Edge Agent
azureiotedge-agent:0.1.0-alpha
Edge Hub
azureiotedge-hub:1.0
Docker
18.09.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Why is my service "Unable to start Kestrel" in EKS only?
The pods then start logging things, which is normal. However, Kestrel should work and as does work, but only on my "own" Kubernetes...
Read more >Host and deploy Blazor Server - ASP.NET Core
In the following example: Kestrel server is running on the host machine. The app listens for traffic on port 5000.
Read more >Deploy to Kubernetes - websockets 11.0.3 documentation
This guide describes how to deploy a websockets server to Kubernetes. It assumes familiarity with Docker and Kubernetes. We're going to deploy a...
Read more >What Is Kubernetes?
Kubernetes, also known as K8s, is an open source container orchestration platform for automating deployment, scaling, and management of containerized apps.
Read more >A Minimal Full-Feature Kestrel WebSocket Server
A Kestrel WebSocket server with realistic features using .NET Core 3.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A potential fix has been checked into master, but we have not back ported this to the preview.
Public preview refresh will be out next week, please re-open as needed.