Do Ingress work with ClusterIP services?

I installed some services and applications to check SSL completion. I didn’t have any problems with services LoadBalancerand NodePortas a backend, but it didn’t work with the service at all ClusterIP.

Although the Ingress backend is described as healthy, I get an HTTP error that does not come from my application.

$ kubectl describe ing nginx-cluster-ssl-ingress
Name:           nginx-cluster-ssl-ingress
Namespace:      default
Address:        X.X.X.X
Default backend:    nginx-cluster-svc:80 (...)
TLS:
  ssl-certificate terminates
Rules:
  Host  Path    Backends
  ----  ----    --------
Annotations:
  https-target-proxy:       k8s-tps-default-nginx-cluster-ssl-ingress
  static-ip:            k8s-fw-default-nginx-cluster-ssl-ingress
  target-proxy:         k8s-tp-default-nginx-cluster-ssl-ingress
  url-map:          k8s-um-default-nginx-cluster-ssl-ingress
  backends:         {"k8s-be-30825":"HEALTHY"}
  forwarding-rule:      k8s-fw-default-nginx-cluster-ssl-ingress
  https-forwarding-rule:    k8s-fws-default-nginx-cluster-ssl-ingress
Events:
  FirstSeen LastSeen    Count   From                SubobjectPath   Type        Reason  Message
  --------- --------    -----   ----                -------------   --------    ------  -------
  28m       28m     1   {loadbalancer-controller }          Normal      ADD default/nginx-cluster-ssl-ingress
  27m       27m     1   {loadbalancer-controller }          Normal      CREATE  ip: X.X.X.X

The HTTP error is as follows:

$ curl http://X.X.X.X/
default backend - 404%

My question is pretty simple: should it work with ClusterIP services? If it should be more or less written in the documentation, where should I look for a solution to this problem?

Thank!

+4
source share
1 answer

GKE Ingress ClusterIP, NodePort.

Ingress, nginx, ClusterIP .

+7

All Articles