Installing NGINX Ingress Controller with integrated Wallarm services¶
These instructions provide you with the steps to deploy the Wallarm Ingress controller to your K8s cluster using Helm when there are no other non-NGINX Ingress controllers deployed.
Requirements¶
-
Kubernetes platform version 1.19-1.23
-
Helm package manager
-
Compatibility of your services with the Community Ingress NGINX Controller version 1.1.3 or lower
-
Access to the account with the Administrator role in Wallarm Console for the EU Cloud or US Cloud
-
Access to
https://api.wallarm.com:444
for working with EU Wallarm Cloud or tohttps://us1.api.wallarm.com:444
for working with US Wallarm Cloud -
Access to
https://charts.wallarm.com
to add the Wallarm Helm charts. Ensure the access is not blocked by a firewall -
Access to the Wallarm repositories on Docker Hub
https://hub.docker.com/r/wallarm
. Make sure the access is not blocked by a firewall -
Access to GCP storage addresses to download an actual list of IP addresses registered in allowlisted, denylisted, or graylisted countries, regions or data centers
See also
Known restrictions¶
-
Operation without the postanalytics module is not supported.
-
Scaling down postanalytics module may result in a partial loss of attack data.
Installation¶
-
Install the Wallarm Ingress controller.
-
Enable traffic analysis for your Ingress.
-
Check the Wallarm Ingress controller operation.
Step 1: Installing the Wallarm Ingress Controller¶
-
Go to Wallarm Console → Nodes via the link below:
- https://my.wallarm.com/nodes for the EU Cloud
- https://us1.my.wallarm.com/nodes for the US Cloud
-
Create a filtering node with the Wallarm node type and copy the generated token.
-
Add the Wallarm chart repository:
-
Create the
values.yaml
file with the Wallarm configuration.Example of the file with the minimum configuration:
<NODE_TOKEN>
is the Wallarm node token. -
Install the Wallarm packages:
helm install --version 3.6.9 <INGRESS_CONTROLLER_NAME> wallarm/wallarm-ingress -n <KUBERNETES_NAMESPACE> -f <PATH_TO_VALUES>
<INGRESS_CONTROLLER_NAME>
is the name for the Wallarm Ingress controller<KUBERNETES_NAMESPACE>
is the namespace to deploy the Wallarm Ingress controller to<PATH_TO_VALUES>
is the path to thevalues.yaml
file
Step 2: Enabling traffic analysis for your Ingress¶
kubectl annotate ingress <YOUR_INGRESS_NAME> nginx.ingress.kubernetes.io/wallarm-mode=monitoring
kubectl annotate ingress <YOUR_INGRESS_NAME> nginx.ingress.kubernetes.io/wallarm-application="<APPLICATION_ID>"
-
<YOUR_INGRESS_NAME>
is the name of your Ingress -
<APPLICATION_ID>
is a positive number that is unique to each of your applications or application groups. This will allow you to obtain separate statistics and to distinguish between attacks aimed at the corresponding applications
Step 3: Checking the Wallarm Ingress Controller operation¶
-
Get the list of pods specifying the name of the Wallarm Ingress controller in
<INGRESS_CONTROLLER_NAME>
:
Each pod should display the following: STATUS: Running and READY: N/N. For example:
-
Send the request with test SQLI and XSS attacks to the Wallarm Ingress controller address:
If the filtering node is working in the
block
mode, the code403 Forbidden
will be returned in the response to the request and attacks will be displayed in Wallarm Console → Events.
Configuration¶
After the Wallarm Ingress controller is successfully installed and checked, you can make advanced configurations to the solution such as:
To find parameters used for advanced configuration and appropriate instructions, please follow the link.