Nginx and Ingress with Kubernetes not routing my request
There are some issues with your setup as far as I can see:
KUBEIPADDRESS
in the URL you call: an IP address won't work because you configured your Ingress to listen ontesthost
. So you need to callhttp://testhost/customer
, and configure your network to resolvetesthost
to the correct IP addressbut what is the correct IP address? You are trying to use k8s master on port 80. That won't work without further configuration. For that you need to use a NodePort service for the Ingress Controller, which exposes it on port 80 (and probably 433). In order to use that low ports, you need to allow it with an option of kube-apiserver, see
--service-node-port-range
on https://kubernetes.io/docs/admin/kube-apiserver/. Once that works, you can use any IP address of any node of your k8s cluster fortesthost
. Note: be sure that no other application uses these ports on any node!