kubernetes ingress

Ingress controller

There are multiple Ingress Controllers:

  • nginx
  • haproxy
  • traefik
  • contour
  • voyager
  • kanali

Declaration

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: whoami
spec:
  rules:
    - host: foobar.FIXME.nip.io
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: foobar
                port:
                  number: 80
    - host: whoami.FIXME.nip.io
      http:
        paths:
          - path: /whoami
            pathType: Prefix
            backend:
              service:
                name: whoami
                port:
                  number: 8080
          - path: /whoareyou
            pathType: Prefix
            backend:
              service:
                name: whoareyou
                port:
                  number: 8080