Kubernetes: Ingress doesn't have IP address

11/12/2017

I setup a 3 nodes K8S cluster locally with virtualbox. When I try out the ingress, it doesn't setup the IP address:

2017-11-11 17:00:49.015691 I | proto: duplicate proto type registered: 
google.protobuf.Any
2017-11-11 17:00:49.016061 I | proto: duplicate proto type registered: google.protobuf.Duration
2017-11-11 17:00:49.016112 I | proto: duplicate proto type registered: google.protobuf.Timestamp
NAME            HOSTS                     ADDRESS   PORTS     AGE
whale-ingress   a.whale.hey,b.whale.hey             80        9m

Ingress:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: whale-ingress
spec:
  rules:
  - host: a.whale.hey
    http:
      paths:
      - path: /
        backend:
          serviceName: whale-svc-a
          servicePort: 80
  - host: b.whale.hey
    http:
      paths:
      - path: /
        backend:
          serviceName: whale-svc-b
          servicePort: 80

Did I set something wrong?

-- Kintarō
kubernetes

2 Answers

12/8/2017

An Ingress is an object that only provides a configuration, not an active component (such as a Pod or a Service). As coreypobrien said, you need to deploy an Ingress controller, which will read the ingresses you deployed in your cluster and change its configuration accordingly.

At this page you can find the documentation of the official kubernetes ingress controller, based on nginx https://github.com/kubernetes/ingress-nginx/blob/master/README.md

Another option is the traefik ingress controller: https://docs.traefik.io/user-guide/kubernetes/

-- whites11
Source: StackOverflow

11/12/2017

Are you running an Ingress controller? A minimal Kubernetes cluster does not have an Ingress controller by default. If not, try deploying this controller: https://github.com/kubernetes/ingress-nginx

-- coreypobrien
Source: StackOverflow