0

I have tried to go through multiple searches on google however doesn't find anything why ingress controller's external ip is not accessible from browser. Its simple get request without any authentication or authorization.

I have followed this article to deploy simple ingress controller to services. https://learn.microsoft.com/en-us/azure/aks/ingress-basic?tabs=azure-cli

Also, when I tried to do curl on external IP of ingress nginx controller from CLI, then I am getting response but from browser/postman Its timed out.

PODS:

NAME
pod/ingress-nginx-controller-5756658855-2c7vl
pod/platformweb-699bd55f6b-pzx4c

Services:

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
service/ingress-nginx-controller LoadBalancer 10.0.35.19 13.78.xxx.xxx 80:32631/TCP,443:30020/TCP
service/ingress-nginx-controller-admission ClusterIP 10.0.1.215 none 443/TCP
service/platformweb ClusterIP 10.0.39.121 none 80/TCP

Here is ingress.yml file

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: platformweb-ingress
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    nginx.ingress.kubernetes.io/use-regex: "true"
  labels:
    name: platformweb-ingress
spec:
  ingressClassName: nginx
  rules:
  - http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: platformweb
            port: 
              number: 80

Any idea How can I resolve this problem.

Thanks in advance.

Jayesh Tanna
  • 398
  • 5
  • 17
  • As per your mentioned document , it's using internal ip to access the using CURL and external ip to access from the browser. – RahulKumarShaw Jul 11 '22 at 15:10
  • Is the service up and running? Does it have endpoints? You can uses tools like netshoot https://github.com/nicolaka/netshoot to diagnose network issues inside the cluster. What does the nginx config look like? Is the Azure LB up and running? Are there any firewall rules in place? More tshoot here https://kubernetes.github.io/ingress-nginx/troubleshooting/#ingress-controller-logs-and-events. If you continue to have an issue feel free to open a github issue. – strongjz Jul 12 '22 at 13:25

1 Answers1

0

Seems you are using an external ip address to access the ingres controller using CURL command. As per same micrsoft document it using an internal ip address to access the ingress controller using curl.

you can use the below command.

curl -L http://{Internal IP}

why ingress controller's external ip is not accessible from browser

This might be because No ingress rules have been created yet, so the NGINX ingress controller's default 404 page is displayed if you browse to the external IP address. Would suggest you to please follow the the same microsoft document carefully to do not miss any steps. Ingress rules are configured in the following steps.

RahulKumarShaw
  • 4,192
  • 2
  • 5
  • 11