'.Net core 5 Swagger not working after publish in Kubernetes

I have build swagger UI in .net core 5. It's working in local iis and kesterl but not working after publish to Kubernetes. Below is my code sample:

Startup.cs enter image description here

Website console enter image description here



Sources

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

Source: Stack Overflow

Solution Source