Network validator sanity check
The Microgateway Network Validator is a netcat initContainer deployed in the web application container alongside the Microgateway Engine sidecar. During the startup of the web application container, the initContainer generates a test request to verify that the Microgateway CNI plugin has configured the routing inside the application container.
Status verification of the Microgateway Network Validator:
- On the application namespace, run
kubectl describe pod ...
.
Example output of a failed sanity check: - Terminal box
... Init Containers: airlock-microgateway-network-validator: Container ID: containerd://47190516e4378b982f3ee854b60c3c95d933c1882b83bda246fa0352006e453e Image: cgr.dev/chainguard/netcat@sha256:6051975a14c51b9d3b525a06004d62a4d323c08ca58e3468343095a55a42fff2 ... State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Error Message: Traffic redirection to Airlock Microgateway Engine is not working. Restart the pod after ensuring that hostNetwork is disabled and a compatible Airlock Microgateway CNI version is installed on the node. Certain environments may also require additional configuration (see docs.airlock.com for more information). Exit Code: 1 Started: Fri, 03 Nov 2023 12:23:13 +0100 Finished: Fri, 03 Nov 2023 12:23:13 +0100 Ready: False ...
- Check for the status (here: terminated with error) and the message text of the
airlock-microgateway-network-validator
container for more information. Note that the message depends on the problem detected and can differ from the example above. - If the web application Pod status fails due to a terminated Network Validator, this is a strong hint for a CNI plugin problem. We recommend checking the logs and installing the Microgateway CNI plugin before the web application Pod is deployed and running.
Testing a deployed web application
For more extensive testing of the deployment, routing and functionality of the Microgateway Engine, we recommend using test-requests to cover all three mentioned aspects.
- Secure a web application with Airlock Microgateway.
- Check the filtering and the traffic routing through the Microgateway Engine:
- Send one or more requests to the web application.
- Check the Microgateway logs to see whether the request has been logged.
Example output:
Further information and links
Internal links: