Ingress

Contents

    Exposes a set of services to the outside world. With Ingress, users do not connect directly to a Service. Users reach the Ingress endpoint, and, from there, the request is forwarded to the desired Service. Under the hood, it can use a loadbalancer... but a single one, for many services!

    https://www.joyfulbikeshedding.com/blog/2018-03-26-studying-the-kubernetes-ingress-system.html
    https://kubernetes.github.io/ingress-nginx/deploy/

    ingress controllers / Edge and service proxies

    IMPORTANT

    → In K8s terminology, it is a controller

    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    metadata:
      name: virtual-host-ingress
      namespace: default
    spec:
      rules:
      - host: blue.example.com
        http:
          paths:
          - backend:
              serviceName: webserver-blue-svc
              servicePort: 80
      - host: green.example.com
        http:
          paths:
          - backend:
              serviceName: webserver-green-svc
              servicePort: 80
    
    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    metadata:
      name: fan-out-ingress
      namespace: default
    spec:
      rules:
      - host: example.com
        http:
          paths:
          - path: /blue
            backend:
              serviceName: webserver-blue-svc
              servicePort: 80
          - path: /green
            backend:
              serviceName: webserver-green-svc
              servicePort: 80
    
    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    metadata:
      name: ingress-service
      annotations:
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/rewrite-target: /$1
        # UPDATE THIS LINE ABOVE
    spec:
      rules:
        - http:
            paths:
              - path: /?(.*)
                backend:
                  serviceName: client-cluster-ip-service
                  servicePort: 3000
              - path: /api/?(.*)
                backend:
                  serviceName: server-cluster-ip-service
                  servicePort: 5000
    

    Proudly Powered by Zim 0.75.2.

    Template by Etienne Gandrille, based on ZeroFiveEight and using JQuery Toc Plugin.