You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kubectl get events -A --watch
NAMESPACE LAST SEEN TYPE REASON OBJECT MESSAGE
kube-bench-mzk6x 3s Warning FailedCreate job/kube-bench-master Error creating: pods "kube-bench-master-" is forbidden: PodSecurityPolicy: unable to admit pod: [spec.securityContext.hostPID: Invalid value: true: Host PID is not allowed to be used spec.volumes[0].hostPath.pathPrefix: Invalid value: "/var/lib/etcd": is not allowed to be used spec.volumes[1].hostPath.pathPrefix: Invalid value: "/etc/kubernetes": is not allowed to be used spec.volumes[2].hostPath.pathPrefix: Invalid value: "/usr/bin": is not allowed to be used]
What did you expect to happen:
I expected the test case executed successfully.
Environment
[What is your version of Kubernetes? (run kubectl version or oc version on OpenShift.)]
[Please include the output from running ps -eaf | grep kube on the affected node. This will allow us to check what Kubernetes processes are running, and how this compares to what kube-bench detected.]
Configuration files
Anything else you would like to add:
Ufortunately
no configurable parameter (like namespace) available for execution, to make sure the proper PSP will be allocated for these PODs
because only the half of the namespace are predictable the other half is randomly generated, it's not possible to prepare the environment (pre create ns, sa, roler, rolebinding, psp)
The only way I found is to disable PSP on cluster level, but it's not so sophisticated. Maybe sa/role/rolebinding/psp should be created automatically, for this purpose.
The text was updated successfully, but these errors were encountered:
Overview
I executed the kube_bench_master test suite on a K8S cluster where strict PSP defined and the test failed.
How did you run kube-bench?
What happened?
Test case failed. For more information please check attached file
functest-kubernetes.log
functest-kubernetes.debug.log
Log from the cluster:
What did you expect to happen:
I expected the test case executed successfully.
Environment
[What is your version of Kubernetes? (run
kubectl version
oroc version
on OpenShift.)]Running processes
[Please include the output from running
ps -eaf | grep kube
on the affected node. This will allow us to check what Kubernetes processes are running, and how this compares to what kube-bench detected.]Configuration files
Anything else you would like to add:
Ufortunately
The only way I found is to disable PSP on cluster level, but it's not so sophisticated. Maybe sa/role/rolebinding/psp should be created automatically, for this purpose.
The text was updated successfully, but these errors were encountered: