‫If you've been thinking about your deployments and your
‫services on them, you may have realized that
‫so far, we haven't talked about OSI
‫Layer 7, or HTTP
‫name routing, or DNS routing, or whatever you want to call
‫it. Basically, the idea that if you're on a server
‫with multiple sites that need to use the same ports,
‫right. Port 80 and 443, then you need something
‫there that routes to different containers, based
‫on something other than just the port.
‫That in Kubernetes is known as Ingress.
‫It's a specific resource, and it's not necessarily
‫a load balancer or anything
‫that you would attribute to a service.
‫It's technically something else that is really
‫focused on the common problem of most
‫clusters want to run lots of different
‫websites, or different containers for different URLs and
‫names. That's where this whole project is
‫focused is the Ingress project.
‫It's not installed, by default, on your Kubernetes cluster,
‫but there are official features for it.
‫The way this works is Kubernetes didn't invent
‫a HTTP proxy.
‫They just provide mechanisms for other third-party
‫proxies to use features so
‫that you install the ingress in your cluster.
‫Then you can tell your apps, based on which
‫one you use, how to use that proxy
‫to get to your container.
‫A good example might be you have website A.com and you have
‫website B.com.
‫Those are going to be two, different deployments.
‫You need to somehow get the same ports on all your
‫nodes...its 80443.
‫You need to get the different websites to the different
‫containers. That's what Ingress is for.
‫In Swarm, we didn't have that feature out-of-the-box.
‫So, you really just had to deploy some proxies as a
‫container and it didn't really have anything special to do
‫with that container. It didn't understand what Ingress was.
‫But, Kubernetes does.
‫When you go look at the documentation, the default
‫sort of example that everyone talks about is Nginx.
‫We've been using Nginx through this course.
‫That one should probably be the one you should try first.
‫I prefer something else.
‫I actually like Traefik and you'll see that in some of my
‫examples, especially in my Swarm course.
‫When you see me talk at conferences, I will often
‫talk about Traefik because it was a proxy created
‫in the world of containers.
‫It's inception was around the idea that we have all
‫these ephemeral containers spinning up and shutting down,
‫and we need to reprogram a proxy, and we need to
‫worry about SSL and all the other things that
‫we need for multiple websites in a container cluster.
‫So, they designed this new product that is now
‫spawning other products. It's got a whole company behind it
‫now and support contracts. You might want to check that
‫out. There's lots of vendors that make these plugins
‫for Kubernetes, including the major ones, right.
‫HAProxy, F5
‫and new players like Envoy and Istio also support
‫ingress types. I will say that, you know, technically the
‫ingress feature itself is still beta in 1.15.
‫Each one of these is going to have their own implementation
‫depending on which one you choose.
‫F5 is an external hardware load balancer that's really
‫common in the enterprise.
‫Obviously, the Ingress controller for it is going to help
‫control that external resource from inside your Kubernetes.
‫The whole point of all of this is so that when you're
‫application developers are writing their YAML
‫with the DevOps people, or maybe with the Ops team
‫itself, they're able to put the annotations into
‫their YAML that are needed for
‫the ingress controller to figure out what to do with them.
‫Basically, how do I route them?
‫What's the right paths? Where am I taking it?
‫What ports am I using? Am I grabbing SSL for
‫you? Am I getting certificates? Are you going to provide me
‫some? All that stuff's handled.
‫First, I'd suggest you look in the resources.
‫Maybe just try out the Nginx by default.
‫Definitely, if you don't have an opinion, try out Traefik
‫because it's easy to use, and it has lots of features,
‫including Let's Encrypt to automatically get certificates
‫for you and your websites right out-of-the-box.
‫If you know your own hardware requirements, or software
‫requirements for what you need to do with Ingress, there's
‫a list in the documentation that you can see in the
‫resources here of all the different Ingress options.