To Install an NGINX with Check Point Nano-Agent for Kuberenetes (k8s) environments:
Replace the docker image used be the NGINX ingress controller with the check point’s NGINX ingress:
To get the image use this registry to pull the following NGINX Ingress image for this deployment.
The image is based on the official NGINX inc. alpine based ingress controller nginx/nginx-ingress:<version>-alpine
If you have a main template for the NGINX configurations make sure you add to the top of it the following line, to load the check point NGINX plugin (which will send the http traffic to the agent for inspection): main-template: |
load_module /usr/lib/nginx/modules/ngx_cp_attachment_module.so;
Currently the agent can protect k8s environment only if it uses an official nginx inc. image (nginx-ingress / regular nginx)
Currently the agent cannot protect k8s environment with non NGINX ingress controller. In addition the agent does not support Kubernetes’s version of nginx-ingress.
Both the agent and above NGINX containers must be of the same version (tag)
Add the following argument to the nano agent container’s arg’s array : [ “--token”, “<token>” ]
Optional:If your environment's internet connection goes through a proxy server, add the proxy address to the nano agent container’s arg’s array as well : [ “--token”, “<token>”, “--proxy" , “<proxy address in the format http://[user:password@]url:port>” ]
Prepare in advanced a volume to be claimed by the agent container (we are creating a stateful set and the agent container requires persistency of some data in cases of restarts / upgrades
Add the following two mount paths + associated volume claim templates : “/etc/cp/conf/”, “/etc/cp/data/”
The deployment yaml with both NGINX and the agent will look like the following example: containers:
‐ image: checkpoint/infinity-next-nginx-ingress
name: nginx-ingress-container
ports:
‐ ... <relevant ports if needed>
env:
‐ ... <relevant env if needed>
args:
‐ ... <relevant args if needed>
storageClassName: "<storage class name as defined in the current environment, e.g. - "gp2" in aws>"
resources:
requests:
storage: 5Mi
‐ metadata:
name: cp-nano-agent-data-volume-claim-template
spec:
accessMode: [ "ReadWriteOnce" ]