Exposing Nginx Server on Azure Kubernetes Service

Jacques Patricks 46 Reputation points
2021-01-04T19:29:32.513+00:00

Hello community,

Am a newbie to Kubernetes, and I recently deployed my chatbot application using clusters. Am experiencing problems when trying to access my deployment on http://<ip>:8000. I also managed to create an Ingress Controller to enable me expose my application on web but am having trouble enabling my application to make use of the controller. Am using linux configurations. Please advise.

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,278 questions
0 comments No comments
{count} votes

Accepted answer
  1. shiva patpi 13,261 Reputation points Microsoft Employee
    2021-01-06T03:58:40.587+00:00

    Hello @Jacques Patricks ,
    I believe you have deployed Nginx Ingress Controller using Helm package to expose your application.
    I am not sure what problem you were experiencing but Nginx ingress controller implementation should be a straight forward.
    Have a look at the basic ingress controller implementation here https://learn.microsoft.com/en-us/azure/aks/ingress-basic with the sample test application.

    When you are using NGINX ingress controller please double check below things:

    1) Ingress Controller (double check annotations)
    "If you have multiple node pools (Windows + Linux) , please make sure the nginx controller pod installed in Linux pool."
    2) Ingress rules
    3) URL or Path based routing.

    (Above basic document should help you out in understanding)
    (Please note the order above i.e. Ingress Controller should be deployed first before Ingress rules)

    If you want to configure custom ingress controller to use Https:- please see https://learn.microsoft.com/en-us/azure/dev-spaces/how-to/ingress-https-nginx#configure-a-custom-nginx-ingress-controller

    FYI ,
    We have other ingress controllers like Application Gateway Ingress Controller which can be deployed/configured using Helm or Aks add-on

    What is Application Gateway Ingress Controller?
    https://learn.microsoft.com/en-us/azure/application-gateway/ingress-controller-overview#:~:text=AGIC%20monitors%20the%20Kubernetes%20cluster,of%20Kubernetes%20Resources%20for%20changes.

    Enable Application Gateway Ingress Controller add-on for an existing AKS cluster with an existing Application Gateway through Azure CLI (Preview)
    https://learn.microsoft.com/en-us/azure/application-gateway/tutorial-ingress-controller-add-on-existing

    Hope above points help you out in resolving the issue , kindly let me know if you have additional questions.

    If this helps , make sure to "Accept Answer" so that it will help the community out there.

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jacques Patricks 46 Reputation points
    2021-01-09T09:33:13.767+00:00

    Hello @shiva patpi ,

    Thank you for the detailed guide that you have provided. I realized that I made a mistake when creating my Kubernetes resource files when deploying my application. I therefore included my ingress.yaml in my deployment manifest so as to run all together to enable creation of that service behind a load balancer. As opposed to creating an separate ingress controller manifest file. Now it is working! I can access the webage with the IP address port 8000.

    0 comments No comments

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.