'C# .NET Console app running locally & on Docker but crashes on Kubernetes

I am facing an issue with a Console C#.NET app. It is running without an issue or any crash, and in Docker as well, running until stopped. On Kubernetes, it's not running successfully. It executes the code and crashes. I need the app to keep running on the Kubernetes cluster.

Can someone help me with this issue? Any ideas?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source