Deploy in Google Kubernetes Engine (GKE) with multi-node clusters

When deploying a sensor in AKS clusters using Kubernetes version 1.19, and with Runtime as 'Containerd', refer to Deploy in Kubernetes - Containerd Runtime. 

See the steps below for deploying the sensor to multi-node clusters of GKE. Be sure to choose the correct yaml file according to the runtime. For Containerd Runtime, use cssensor-containerd-ds.yml (see steps under GKE node version 1.19 and later).

Insecure Registry flag (--insecure-registry) is not supported in GKE environment.

GKE node version 1.19 and later

Follow the steps below for deploying the sensor to multi-node clusters of GKE. The steps in this section apply to GKE node version 1.19 and later.

Steps for deploying without persistent storage

Modify the cssensor-containerd-ds.yml with the following args:

args: ["--k8s-mode", "--container-runtime", "containerd", "--sensor-without-persistent-storage", "--enable-console-logs"]

Under volumeMounts remove/comment persistent-volume and agent-volume sections.

volumeMounts:

- mountPath: /usr/local/qualys/qpa/data

 name: persistent-volume

- mountPath: /usr/local/qualys/qpa/data/conf/agent-data

 name: agent-volume

Under volumes remove/comment the persistent-volume and agent-volume sections.

volumes:

- name: persistent-volume

 hostPath:

   path: /usr/local/qualys/sensor/data

   type: DirectoryOrCreate

- name: agent-volume

 hostPath:

   path: /etc/qualys

   type: DirectoryOrCreate

Steps for deploying with persistent storage

Follow the deployment instructions as outlined in the section Deploy in Kubernetes - Containerd Runtime but make the following change to the persistent storage path under volumes.

Under volumes, change the persistent storage path from "/usr/local/qualys/sensor/data" to "/tmp/qualys/sensor/data" since the default path is not writable on GKE nodes.

volumes:

- name: persistent-volume

 hostPath:

   path: /tmp/qualys/sensor/data

   type: DirectoryOrCreate