Creating an Ingress Resource

In order to get the Ingress controller fully operational, you should deploy an Ingress resource. The Ingress resource sets the routing rules for incoming HTTP and HTTPS traffic so that such traffic can reach your services.

The Ingress resource deployed with these settings will balance the incoming HTTP and HTTPS traffic with the Host header. You can add several host entries to the spec.rules section.

You could define routing rules for each domain name that is set using the host parameter. The file describes the following behavior: if the user navigates to /, they are redirected to the certain service deployed in the Kubernetes cluster.

You can obtain more information about Ingress resource deployment process here.

2. Deploying the Ingress Resource

To deploy the Ingress resource described by the ingress.yaml file, execute the following command:

$ kubectl apply -f ingress.yaml

Given that the resource deployment was successful, you will be provided with the following output:

ingress.extensions/<the name of the Ingress resource> created

Check out the newly deployed Ingress resource by executing the following command:

Obtain a detailed description of the Ingress resource by executing the following command:

$ kubectl describe ingress <the name of the Ingress resource>

You will be given the following information in the description:

The IP address and the port numbers on which the Ingress controller is listening

The Ingress routing rules

An event list

Make sure that you set up the correct DNS records pointing to the Ingress controller’s IP address for the required domain names.

Now you can check the Ingress operation by navigating in your browser to the necessary address assigned to your application (e.g., www.example.com). Given that you correctly deployed the Wallarm NGINX Plus Ingress controller and the Ingress resource, you should be redirected to your application’s webpage.