.net 8 docker image on AKS

Chetan Prakash Saraswat 26 Reputation points
2025-03-07T13:56:25.6366667+00:00

Hi, We have a web project based on .NET which is containerized and published on ACR and further deployed on AKS. While performing the .NET version upgrade, since docker image on linux now doesn't runs on privileged port 80, hence we are exposing 8080 and 8081 using a non root user. Runs locally fine on Docker desktop, but when pushed on AKS the pods keep on failing which seems due to some mismatch in the different ports we have configured on deployment yaml, service yaml and ingress yaml. See below samples for all
DockerFile
User's image

Deployment yaml
User's image

Service yaml
User's image

ingress yaml
User's image

All these different port are confusing me and somehow the mismatch in one of these is resulting in pod failure. Note AKS version we are using is latest i.e. 1.31.5.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,306 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.