install nginx ingress controller AKS

Shrikant Bhagwat 61 Reputation points
2021-08-01T02:47:21.587+00:00

Hi
What is use of NGIX Ingress Controller ?
How do I install NGIX Controller
I have yaml file given by vendor

************************* INGRESS CONFIGURATION **************************

MANDATORY in cloud deployments

ingress:

enabled: true - To enable ingress configuration

enabled: true
annotations:
nginx.ingress.kubernetes.io/affinity: "cookie"
nginx.ingress.kubernetes.io/session-cookie-name: "route"
nginx.ingress.kubernetes.io/session-cookie-expires: "86400"
nginx.ingress.kubernetes.io/session-cookie-max-age: "86400"
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"

ac:

hosts:

# host: <dns name>

- host: lab-ac.med.umich.edu

# Enables Backend SSL between Ingress Controller and AC

https: true

paths:

# /path: AC service port to redirect traffic

/: 2443

idp:
hosts:
# host: <dns name>

  • host: lab-weblogin.med.umich.edu
    # Enables Backend SSL between Ingress Controller and IDP
    https: true
    # /path: IDP service port to redirect traffic
    paths:
    /nidp: 8443
    ag:
    hosts:
    # host: <dns name>
  • host: www.cloudag.com
    # Enables Backend SSL between Ingress Controller and AG
    https: true
    # /path: AG service port to redirect traffic
    paths:
    /: 443
  • host: dbmh.cloudag.com
    # Enables Backend SSL between Ingress Controller and AG
    https: false
    # /path: AG service port to redirect traffic
    paths:
    /proxy1: 80

TLS configuration for all hosts in AC, IDP and AG

tls:
#- secretName: cloudag
# hosts:
# - www.cloudag.com
#- secretName: cloudidp
# hosts:

  • lab-weblogin.med.umich.edu

Let us know Do i need to make change in yaml file.

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,447 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. shiva patpi 13,366 Reputation points Microsoft Employee Moderator
    2021-08-01T18:16:24.317+00:00

    Hello @Shrikant Bhagwat ,
    I think you have to start with basics of "Ingress" before you jump onto inginx controller.

    Check out the below article which starts with "Ingress" -> "IngressController" -> "NginxIngressController"
    https://github.com/nginxinc/kubernetes-ingress

    Then see how NGINX Ingress Controller works behind the scenes:
    https://kubernetes.github.io/ingress-nginx/how-it-works/

    Once you are done with above basics , use the below document to deploy a sample POD and how to access it via NGINX Ingress controller

    https://learn.microsoft.com/en-us/azure/aks/ingress-basic

    Deploying NGINX Ingress Controller with example:

    https://matthewpalmer.net/kubernetes-app-developer/articles/kubernetes-ingress-guide-nginx-example.html

    (With above 2 running examples , I think all your above queries will be answered)
    (You just need to configure/Customize the above mentioned YAML files based upon your client provided values)

    Let us know if you need additional help on this .

    0 comments No comments

  2. Shrikant Bhagwat 61 Reputation points
    2021-08-01T19:41:01.75+00:00

    Thanks for Documentation

    Following are my nodes

    PS C:\WINDOWS\system32> kubectl get nodes -o wide
    NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
    aks-agentpool-20294322-vmss000000 Ready agent 2d11h v1.20.7 10.240.0.4 <none> Ubuntu 18.04.5 LTS 5.4.0-1051-azure containerd://1.4.4+azure
    aks-agentpool-20294322-vmss000001 Ready agent 2d11h v1.20.7 10.240.0.5 <none> Ubuntu 18.04.5 LTS 5.4.0-1051-azure containerd://1.4.4+azure

    Are these IP Address Private IP Address each node ?
    Do they have Cluster IP ?
    Are these separate standalone nodes or cluster with 2 nodes ?

    I did setup Ingress Controller based on documentation

    PS C:\WINDOWS\system32> kubectl --namespace default get services -o wide -w nam-ingress-ingress-nginx-controller
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
    nam-ingress-ingress-nginx-controller LoadBalancer 10.0.254.117 52.147.218.30 80:30363/TCP,443:31634/TCP 24h app.kubernetes.io/component=controller,app.kubernetes.io/instance=nam-ingress,app.kubernetes.io/name=ingress-nginx

    PS C:\WINDOWS\system32> kubectl get pods,svc
    NAME READY STATUS RESTARTS AGE
    pod/nam-ingress-ingress-nginx-controller-65d74469d9-j9r9w 1/1 Running 0 25h
    pod/nginx 1/1 Running 0 25h
    pod/node-debugger-aks-agentpool-20294322-vmss000000-g8xt9 0/1 Completed 0 5h2m

    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    service/kubernetes ClusterIP 10.0.0.1 <none> 443/TCP 2d16h
    service/nam-ingress-ingress-nginx-controller LoadBalancer 10.0.254.117 52.147.218.30 80:30363/TCP,443:31634/TCP 25h
    service/nam-ingress-ingress-nginx-controller-admission ClusterIP 10.0.129.117 <none> 443/TCP 25h
    PS C:\WINDOWS\system32>

    I have application provided by vendor which is supposed to installed by Helm Package Manager. They require NGIX:Ingress to be configured.

    Based on output above, do you think Ingress is configured ?
    Thanks


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.