I've done the installation of Nginx Ingress Controller by using this guide (https://kubernetes.github.io/ingress-nginx/deploy/) in 2 steps:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/mandatory.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud-generic.yamlThen it created for me 2 entities :
first entity is called ingress-nginx in service & ingress section and the second one:
inside workloads section called nginx-ingress-controller. Next step of my configuration process was creating service with Ingress type:
ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: "nginx-ingress-controller"
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
kubernetes.io/ingress.global-static-ip-name: my static ip
name: booknotes-ingress
namespace: 'default'
spec:
rules:
- host: www.domain.com
http:
paths:
- path: /*
backend:
serviceName: booknotes-service
servicePort: 80Then I've exposed booknotes-service from my booknotes (Depoloyment) with Custer IP type . But when I go to www.domain.com it is in a pending state . What I've done wrong ? And I don't really understand well all the flow from the request to my pod in this case.
Have you binded the external ip address of your ingress controller to your dns? Can you resolve the dns? Try nslookup www.domain.com and check if the ip address is the one of your ingress controller.
Once you resolve the problem with the dns you may get either a 404 or a 502 as response. Which means you are resolving but not passing traffic to the service. Update your question with that and we can continue.
Pd.- Remove the /* in the path definition of the ingress resource. Just /