I am currently in a doubt on how to properly run kube-bench in my cluster (AKS cluster to be specific). I used of course the job definition file from github, and modified it to run it as a cronjob (it is maybe an overkill but it isn't relevant in my question). This definition runs the pod in the default namespace, and I changed it as well to use a newly create kube-bench namespace. Furthermore, it runs it only on one node, and as I understood it, it runs the tests only on that node in this case. So my questions would be:
- is it a good practice to run it in separated namespace intended only for kube-bench?
- If I have more nodes (and nodepools) in a cluster, do I need to run the job/pod on every node (eg. as an daemonset), and collect the report for every node individually?
Thanks in advance