Skip to content
ImagineWorld

Exposing Your Applications Using Ingress Controllers and Certificates

node_idnode-book_edge-computing-systems-with-kubernetes_chapter-06-exposing-your-applications-using-ingress-controllers-and-cer
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num6
chapter_titleExposing Your Applications Using Ingress Controllers and Certificates
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

Chapter 6 — Exposing Your Applications Using Ingress Controllers and Certificates

Section titled “Chapter 6 — Exposing Your Applications Using Ingress Controllers and Certificates”

Ingress controllers fulfill traffic rules defined by an ingress object and are needed to expose traffic to APIs or microservices that your system uses. Ingress controllers are implemented in Kubernetes clusters. As an option to expose your deployments outside the cluster, instead of using dedicated load balancers for each deployment, the ingress controller shares a single load balancer for your deployments. By default, Kubernetes uses ClusterIP services to access deployments in the internal cluster network. Creating applications for edge computing involves configuring ingress controllers with lightweight solutions in mind: K3s and its default ingress controller, Traefik v1 using other ingress controllers such as NGINX or Contour, and security encryption for service communication.

In this chapter, we’re going to cover the following main topics:

  • Understanding ingress controllers and ingresses
  • Installing Helm for ingress controller installations
  • Installing and configuring cert-manager
  • Using Traefik to expose your applications
  • Using NGINX to expose your applications
  • Troubleshooting your ingress controllers
  • Pros and cons of Traefik, NGINX, and Contour
  • Tips and best practices for ingress controllers

Before starting, you need the following to run the examples in this chapter:

  • A Raspberry Pi cluster with K3s installed
  • kubectl configured to access your cluster
  • Helm installed and configured

Note

If you don’t want to use Traefik and you want to omit the default installation of this ingress controller in your cluster, add the --no-deploy traefik --disable traefik flags when you are installing your master node. For other details of installing your K3s cluster, refer to Chapter 3, K3S Advanced Configurations and Management, or visit https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/. Remember to install a bare metal load balancer such as MetalLB, which is necessary to generate a load balancer service, which is needed to install ingress controllers.

With these requirements, you are going to experiment with exposing your applications in different ways.

For more detail and code snippets, check out this resource on GitHub: https://github.com/PacktPublishing/Edge-Computing-Systems-with-Kubernetes/tree/main/ch6

Kubernetes uses ingress controllers to expose your deployments outside the cluster. An ingress controller is the adaptation of a proxy to expose your applications, and Ingress is the Kubernetes object that uses this adaptation. An ingress controller works as a reverse proxy like NGINX to expose your application using HTTP/HTTPS protocols to a load balancer. This load balancer is the endpoint to expose your application outside the cluster. It’s in charge of receiving and controlling traffic for your application. The benefit of this is that you can share this load balancer, to expose as many applications as you want, but using all the features that your ingress controller provides. There are different ingress controller implementations, such as NGINX, Traefik, Emissary, and Envoy.

Taking as a reference Figure 6.1, to expose your application, you must create a ClusterIP service that creates an internal DNS name for your Deployment or Pod. This service automatically forwards the traffic across the different replicas of your service, which perform load balancing. An Ingress uses the LoadBalancer service that your ingress controller provisioned when you installed it. This LoadBalancer has a public IP address if the cluster is not private. This IP receives traffic outside the cluster, then forwards this traffic to the ClusterIP service that your application is using. Internally, the Ingress object uses configuration files to act as a reverse proxy. For example, if you are using NGINX, the ingress object is going to use configurations that are used in a regular NGINX configuration file.

In the context of Kubernetes, an ingress object tries to match the associated ClusterIP service of your application, using labels. This is how an ingress works internally. You can see an ingress as the common virtual hosts feature that NGINX and Apache provide for websites.

Figure 6.1 – Ingress in Kubernetes

Based on the official documentation of Kubernetes, a basic YAML file to create an ingress controller should look like this:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80

The most important sections for ingresses are the annotations and spec sections. The annotations will define the ingress controller to use, in this case, NGINX. This section could include additional configurations for the ingress, such as rewriting the URL or activating features such as authentication, and so on. This example defines the /testpath route to access your application. Now you have to apply the YAML file with kubectl. For example, if this file is called minimal-ingress.yaml, you have to run the following command to create the minimal-ingress controller:

$ kubectl apply -f minimal-ingress.yaml

And that’s the way that ingress controllers and ingresses work. Now let’s install Helm to install an ingress controller in the next section.

Installing Helm for ingress controller installations

Section titled “Installing Helm for ingress controller installations”

Before we start using an ingress controller, we need to install Helm. Helm is a package manager for Kubernetes, which you can use to install software. Helm uses Helm Charts, which contain the definitions to install and configure your deployments.

To install Helm, follow the given steps:

  1. Download Helm with the next command:
    $ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
  2. Change permissions and launch the installer by executing the following lines:
    $ chmod 700 get_helm.sh
    $ ./get_helm.sh

Now you have Helm installed, let’s move on to install the NGINX ingress controller in the next section.

cert-manager is software that you want to install if you want to add certificates or certificate issues as a resource type in Kubernetes. These certificates can be used by applications, but in this specific case, we are going to use cert-manager to add encrypted traffic to your app, using the HTTPS protocol.

To install cert-manager, we are going to use Helm. To install Helm, you have to follow the given steps:

  1. Add the Jetstack repo, which contains cert-manager:
    $ helm repo add jetstack https://charts.jetstack.io
  2. Update your local Helm Chart repository cache. To do this, execute the following command:
    $ helm repo update
  3. Now install cert-manager using Helm:
    $ helm install \
    cert-manager jetstack/cert-manager \
    --namespace cert-manager \
    --create-namespace \
    --version v1.5.4 \
    --set prometheus.enabled=false \
    --set webhook.timeoutSeconds=4 \
    --set prometheus.enabled=false \
    --set installCRDs=true

This is going to install cert-manager in the cert-manager namespace, with version 1.5.4. This cert-manager installation doesn’t include Prometheus but includes cert-manager Customer Resource Definitions (CRDs) and configures timeout parameters for webhook validations when generating a certificate.

  1. Create a self-signed issuer in cert-manager, to create certificates for your local domains. To do this, create the self-signed-issuer.yaml file with the following content:
    apiVersion: cert-manager.io/v1
    kind: ClusterIssuer
    metadata:
    name: self-signed-issuer
    spec:
    selfSigned: {}
  2. Now create an issuer that uses Let’s Encrypt to create a certificate that could be used for public domains. To do this, create the letsencrypt-staging.yaml file with the following content:
    apiVersion: cert-manager.io/v1
    kind: Issuer
    metadata:
    name: letsencrypt-staging
    spec:
    acme:
    server: https://acme-staging-v02.api.letsencrypt.org/directory
    privateKeySecretRef:
    name: letsencrypt-staging
    solvers:
    - http01:
    ingress:
    class: nginx

This file is assuming, as an example, that you will use this issuer in a staging environment, but you can customize this file as you want.

Important Note

Be aware that ClusterIssuer is cluster scoped and Issuer is namespace scoped.

  1. Now apply these files to create the self-signed issuer for a staging environment, using the following command:
    $ kubectl apply -f self-signed-issuer.yaml -f letsencrypt-staging.yaml

Now you have cert-manager installed and ready to use. You can also create basic issuers for your applications. This part will be crucial to configure certificates for your domains if necessary. So now, let’s move towards installing our first ingress controller, NGINX.

NGINX is the most widely used ingress controller on Kubernetes. It has all the necessary features that you need for basic and complex configurations to expose your application. It has all the experience and support of the community behind NGINX. It’s stable and you can still use it for devices using ARM processors.

To install the NGINX ingress controller, follow the given steps:

  1. Create a namespace to install the NGINX ingress controller:
    $ kubectl create ns nginx-ingress
  2. Add the repository that contains the Helm Chart of the NGINX ingress controller and update the repository of charts that Helm is going to use:
    $ helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
    $ helm repo update
  3. Install the NGINX ingress controller with the following command:
    $ helm install nginx-ingress ingress-nginx/ingress-nginx -n nginx-ingress

This will output that the installation was successful.

  1. To check whether the nginx-ingress controller was installed, run the following command:
    $ helm list -n nginx-ingress
  2. After installing the nginx-ingress controller, K3s will provide a load balancer. In this case, we assume that we are using MetalLB. To obtain the load balancer IP address provisioned by your ingress controller, run the following command:
    $ IP_LOADBALANCER=$(kubectl get svc nginx-ingress-ingress-nginx-controller --output jsonpath='{.status.loadBalancer.ingress[0].ip}' -n nginx-ingress)

Here, the IP_LOADBALANCER variable contains the IP of the load balancer created by the ingress controller, which is the endpoint for your applications. You can check the value by running the following command:

$ echo $IP_LOADBALANCER

Using as a reference the installation of the K3s cluster in Chapter 5, K3s Homelab for Edge Computing Experiments*,* you will see an IP like this: 192.168.0.240.

  1. You can use that IP to create a DNS record to point the ingress to a domain, or to access your service using a path. Let’s say that, for example, the returned IP is 192.168.0.241. You can access your service access in your browser with the URL http://192.168.0.240. Another option is to use a path to access your application; for example, the URL would be like this: http://192.168.0.240/myapp.
  2. Finally, if you want to uninstall nginx-ingress, run the following command:
    $ helm uninstall nginx-ingress -n nginx-ingress

Now that you have installed the NGINX ingress controller, let’s move on to study a basic example using this ingress controller.

It’s time to start using NGINX as your ingress controller. We are going to expose your first application using NGINX. To begin, let’s deploy a simple application. To do this, follow the given steps:

  1. Create a simple deployment using nginx image with the following command:
    $ kubectl create deploy myapp --image=nginx
  2. Create a ClusterIP service for the myapp deployment:
    $ kubectl expose deploy myapp --type=ClusterIP --port=80
  3. Create an Ingress using the domain 192.168.0.240.nip.io. In this example, we are assuming that the endpoint for the ingress is 192.168.0.240. This is the same IP as the load balancer created by the ingress controller. When you access your browser, the page https://192.168.0.241.nip.io is going to show the NGINX myapp Deployment, which you have already created. nip.io is a wildcard DNS for any IP address, so with this, you can get a free kind of domain to play with your ingress definitions. Let’s move on to create this ingress by creating the myapp-ingress.yaml file:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    name: myapp-ingress-tls-nginx
    annotations:
    kubernetes.io/ingress.class: "nginx"
    cert-manager.io/cluster-issuer: self-signed-issuer
    spec:
    tls:
    - hosts:
    - 192.168.0.241.nip.io
    secretName: myapp-tls-nginx
    rules:
    - host: 192.168.0.241.nip.io
    http:
    paths:
    - path: /
    pathType: Prefix
    backend:
    service:
    name: myapp
    port:
    number: 80

You can customize this file as you want. If you don’t want HTTPS for your application, omit the TLS section and the annotation cert-manager.io/cluster-issuer. If you are using a public domain, use the following annotation:

cert-manager.io/cluster-issuer: letsencrypt-staging
  1. If you are using a local domain, for example, myapp-test-nginx.test, you have to modify the /etc/hosts file and add a line like this:
    192.168.0.241 myapp-test-nginx.test

This is necessary to resolve the local domain for your app. Also, remember to modify tls.hosts and rules.hosts in the file in order to use a domain such as myapp-test-nginx.test. So, the second option will be like this:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myapp-ingress-tls-nginx
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: self-signed-issuer
spec:
tls:
- hosts:
- myapp-test-nginx.test
secretName: myapp-tls-nginx
rules:
- host: myapp-test-nginx.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: myapp
port:
number: 80
  1. Create the ingress using the previous file using the following command:
    $ kubectl apply -f myapp-ingress-tls-nginx.yaml
  2. Access the myapp deployment by using the URL https://192.168.0.241.nip.io or https://myapp-test-nginx.test in your browser page.

Note

Because this is a self-signed certificate, you have to accept the security exception in your browser.

Or, use curl to access the page with the following command:

$ curl -k https://192.168.0.240.nip.io
or
$ curl -k https://myapp-test-nginx.test

If you don’t want to use HTTPS, you can access the page with the URL http://192.168.0.241.nip.io or https://myapp-test-nginx.test in your browser or by using the curl command.

  1. If you want to delete the ingress, run the following command:
    $ kubectl delete -f myapp-ingress.yaml

Note

When you delete the ingress, and you are using a self-signed issuer, the secret used for Let’s Encrypt will not be deleted. You have to delete it manually using the kubectl command. For example, you can run the following command to delete the secret from the previously created ingress: kubectl delete secrets myapp-tls-nginx.

Now you have learned how to use NGINX. Next, it’s time to learn how to use Traefik to expose your applications in the next section.

Traefik is the ingress controller included by default in K3s. It uses the same configurations as NGINX as shown in the previous example in the myapp-ingress.yaml file. Let’s assume that you already have created the myapp Deployment from the previous section. So, let’s get started with Traefik by following the given steps:

  1. To find the load balancer IP address created by Traefik, run the following command:
    $ IP_LOADBALANCER=$(kubectl get svc traefik --output jsonpath='{.status.loadBalancer.ingress[0].ip}' -n kube-system)

Run the following command to see the current IP address assigned to the load balancer that the Traefik installation provisioned. This will be used to create an entry in the /etc/hosts file:

$ echo $IP_LOADBALANCER

Let’s say that returns 192.168.0.240. You have to add the next line to the /etc/hosts file:

192.168.0.240 myapp-test-traefik.test

Now you are ready to create the Ingress object.

  1. To expose myapp using nip and TLS, create the myapp-ingress-tls-traefik.yaml file with the following content:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    name: myapp-ingress-traefik
    annotations:
    kubernetes.io/ingress.class: "traefik"
    cert-manager.io/cluster-issuer: self-signed-issuer
    traefik.ingress.kubernetes.io/router.tls: "true"
    spec:
    tls:
    - hosts:
    - myapp-test-traefik.test
    secretName: myapp-tls-traefik
    rules:
    - host: myapp-test-traefik.test
    http:
    paths:
    - path: /
    pathType: Prefix
    backend:
    service:
    name: myapp
    port:
    number: 80
  2. Apply the file with the following command:
    $ kubectl apply -f myapp-ingress-tls-traefik.yaml
  3. (Optional) If you want to use the nip.io service, the YAML file will look like this:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    name: myapp-ingress-traefik
    annotations:
    kubernetes.io/ingress.class: "traefik"
    cert-manager.io/cluster-issuer: self-signed-issuer
    traefik.ingress.kubernetes.io/router.tls: "true"
    spec:
    tls:
    - hosts:
    - myapp-test-traefik.test
    secretName: myapp-tls-traefik
    rules:
    - host: myapp-test-traefik.test
    http:
    paths:
    - path: /
    pathType: Prefix
    backend:
    service:
    name: myapp
    port:
    number: 80
  4. (Optional) Apply the file with the following command:
    $ kubectl apply -f myapp-ingress-tls-traefik.yaml

Now you have configured and used Traefik as your load balancer.

Remember that if you didn’t use the –disable traefik parameter, Traefik will be installed in your K3s cluster. Now, it’s time to use Contour. So, let’s move on to the next section.

Contour ingress controller installation and use

Section titled “Contour ingress controller installation and use”

Contour is an Envoy-based ingress controller. The advantage of using Envoy is that it’s fast and includes some powerful features that are found in service meshes, such as rate limits, advanced routing, metrics, and so on. If speed is key in your project, Contour will be the best solution in most cases. Contour is a lightweight solution and is optimized to run quickly. This makes Contour a good choice for edge computing. Now let’s move on to start using Contour.

To install Contour, follow the next steps:

  1. Install Contour using the quickstart configuration it provides:
    $ kubectl apply -f https://projectcontour.io/quickstart/contour.yaml
  2. If you want to use nip.io, you have to first find the IP of the Contour load balancer and create an entry in the /etc/hosts file from your machine. To find the IP of Contour, run the following command:
    $ IP_LOADBALANCER=$(kubectl get svc envoy--output jsonpath='{.status.loadBalancer.ingress[0].ip}' -n projectcontour)

If you run the following command, it will show the load balancer IP that the Contour ingress controller installation provisioned, which will be used to create an entry in the /etc/hosts file:

$ echo $IP_LOADBALANCER

This will show the load balancer IP that the Contour installation created. This will be used to create an entry in the /etc/hosts file.

Let’s say that returns 192.168.0.242. You have to add the next line to the /etc/hosts file:

192.168.0.242 myapp-test-contour.test

Now you are ready to create the Ingress object.

  1. Create a file with a basic configuration for contour. Let’s call this file myapp-ingress-tls-contour.yaml. This file will have the following content:
    apiVersion: networking.k8s.io/v1
    kind: Ingress
    metadata:
    name: myapp-ingress-tls-contour
    annotations:
    kubernetes.io/ingress.class: "contour"
    cert-manager.io/cluster-issuer: self-signed-issuer
    spec:
    tls:
    - hosts:
    - myapp-test-contour.test
    secretName: myapp-tls-contour
    rules:
    - host: myapp-test-contour.test
    http:
    paths:
    - path: /
    pathType: Prefix
    backend:
    service:
    name: myapp
    port:
    number: 80
  2. Apply the YAML file with the following command:
    $ kubectl apply –f myapp-ingress-tls-contour

Now we know how to use Contour using the Ingress object in Kubernetes. So, let’s see how to use Contour using its own objects in Kubernetes in the next section.

Using Contour with HTTPProxy and cert-manager

Section titled “Using Contour with HTTPProxy and cert-manager”

Contour can be used in the same way as the NGINX ingress controller, but you can also use the HTTPProxy object that Contour provides. The same example, myapp-ingress-tls-contour, can be created using Contour objects. Let’s see the equivalent for the Contour ingress controller. First, let’s create the certificate with the cert-manager object. Let’s call the file myapp-tls-contour.yaml. It will look like this:

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: myapp-tls-contour
spec:
commonName: myapp-test-contour.test
dnsNames:
- myapp-test-contour.test
issuerRef:
name: self-signed-issuer
kind: ClusterIssuer
secretName: httpbinproxy

The myapp-tls-contour.yaml file definition creates the certificate to be used by the HTTPProxy object. Let’s create the myapp-ingress-http-proxy-tls-contour.yaml file with the equivalent configuration of the myapp-ingress-tls-contour.yaml file, but now using the HTTPProxy object and the previously generated certificate. This will look like this:

myapp-ingress-http-proxy-tls-contour.yaml
apiVersion: projectcontour.io/v1
kind: HTTPProxy
metadata:
name: myapp-ingress-http-proxy-tls-contour
spec:
virtualhost:
fqdn: myapp-test-contour.test
tls:
secretName: myapp-tls-contour
rateLimitPolicy:
local:
requests: 3
unit: minute
burst: 1
routes:
- services:
- name: myapp
port: 80

Notice that this object sets a rate limit of 3 requests per minute with an additional request or soft limit to have, in total, 4 requests per minute. If the limit is exceeded, Contour will block the request. You can access the site with the following command:

$ curl -k https://myapp-test-contour.test

The -k parameter omits the validation of the self-signed certificate created by cert-manager.

As you can see, Contour can use the Kubernetes ingress object, and you can add more features as rate limits using the objects provided by Contour. Now, it’s time to troubleshoot your ingress controllers or ingress definitions. Let’s move on to the next section.

These are some useful commands that you can use to troubleshoot your ingress controllers:

  1. To check the NGINX ingress controller logs, run the following command:
    $ kubectl logs -f deploy/nginx-ingress-ingress-nginx-controller -n nginx-ingress

This will show the logs when an ingress uses NGINX as the ingress controller.

  1. To check Traefik ingress controller logs, run the following command:
    $ kubectl logs -f deploy/traefik -n kube-system
  2. To check Contour ingress controller logs, run the following command:
    $ kubectl logs -f deploy/contour -n projectcontour

These commands are useful for checking what is happening inside your ingress controller deployments. Now, here are some useful commands to check that your ingress definition is working properly:

$ kubectl get svc
$ kubectl get ingresses

If you want to use the ingress controller’s own objects, such as HTTPProxy and so on, run the following command:

$ kubectl get OBJECT_NAME

Here, OBJECT_NAME should be, for example, HTTPProxy, Certificate, and so on. This depends on what object you want to check. For a full list of these objects, you can check the official documentation for NGINX, Traefik, and Contour.

Now you have learned about troubleshooting your ingress controller deployment and your ingress definitions, let’s explore the pros and cons of the ingress controllers that we have used in this chapter.

Pros and cons of Traefik, NGINX, and Contour

Section titled “Pros and cons of Traefik, NGINX, and Contour”

All the ingress controllers have the basic features to expose your application, that is, they are compatible with the Ingress object in Kubernetes. So, let’s explore the pros and cons of each Ingress controller. Let’s get started with this quick comparison:

  • NGINX Ingress is an ingress controller that uses NGINX to expose applications in your cluster.
    • Pros: It is the most widely used ingress controller for Kubernetes. It has a lot of documentation. Developer and community support is widely available. The community behind it is bigger than Traefik and Contour.
      • Cons: It can be slow compared to Envoy-based ingress controllers such as Emissary, Gloo, and Contour.
  • Traefik is an ingress controller created by Traefik Labs. It has a lot of features, which can be used as plugins. It can be used to visualize your applications on a dashboard.
    • Pros: It has a dashboard and a lot of documentation. It also has some service mesh capabilities.
      • Cons: It can be slow when compared against NGINX and Contour. The documentation is not focused on Kubernetes, and can be difficult to understand.
  • Contour is an ingress controller based on Envoy, a tool owned by VMware. It’s used in Tanzu, a platform for managing Kubernetes. This means that a big company supports Contour.
    • Pros: It’s fast because of its architecture and the language used for its binary, which is C. It has enough features to expose your application. It can be used as a service mesh. Big projects such as Istio use Envoy as their default ingress controller. Contour has support for ARM devices.
      • Cons: Contour is not mature and has missing features. It has fewer features compared with NGINX and Traefik.

The use of ingress controllers could be focused on exposing your application. Depending on the feature you need, you can choose the previous ingress controllers. If you want to use a stable ingress controller, choose NGINX. If you are looking for auto-discovery features or a dashboard to visualize your endpoints, maybe you could use Traefik. And if you are looking for speed or a customizable ingress controller, choose Contour, or maybe you can create your own solution using Envoy.

Tips and best practices for ingress controllers

Section titled “Tips and best practices for ingress controllers”

These are some ideas that you can explore when using ingress controllers:

  • Use routing features: Each of these ingress controllers has different ways to implement routing to expose your application. Read the official documentation of these ingress controllers to understand which has your desired features.
  • Create a proof of concept (POC) to evaluate which ingress controller is best for your use case.
  • Install Traefik 2.0: If you like Traefik, maybe you can install Traefik 2.0. K3s includes Traefik version 1.0, which only has the necessary features to expose your application. But if you need more advanced reverse proxy features for your applications, you can install Traefik 2.0, which includes a dashboard and other features that you may want to use.
  • Introduce rate limits: Implement rate limits to your applications. This is a nice feature when you want to prevent spikes or denial-of-service attacks.
  • Implement TLS: This is a common use case. It’s recommended to encrypt your traffic to prevent a hacker from stealing your information. It’s important to provide additional security for your applications.
  • Install basic authentication: This is the most basic kind of security for your endpoints. With this, you can set a user and password to access your applications.
  • Secure access with JSON Web Tokens (JWTs): This is a nice feature to get more control and use tokens to access your endpoints. It is a better and more secure option than using a basic authentication method.

Now you have other ideas to implement when you are using an ingress controller and creating ingress definitions to expose your applications. Now it is time for a quick summary of this chapter.

In this chapter, we learned how to use different ingress controllers, such as NGINX, Traefik, and Contour. These ingress controllers are the most used ones, starting with NGINX, then Traefik, and finally Contour, which is based on Envoy. This chapter showed you how to use NGINX, Traefik, and Contour to solve common daily tasks in real production environments. The examples covered the use of TLS, routes, and some basic limit rates to access your applications. This chapter covered the last topic necessary to start with practical applications of all these technologies in the next chapter.

Here are a few questions to validate your new knowledge:

  • What is an ingress controller?
  • When can you use an ingress controller?
  • How can you create an ingress definition to expose your applications?
  • How can you create your ingress definition for NGINX, Traefik, or Contour?
  • How can you troubleshoot your ingress controllers and ingress definitions?
  • How can you use MetalLB with your ingress controllers?

You can refer to the following references for more information on the topics covered in this chapter: