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
There are situation where kube-bench is trying to execute the ps coammd and this call fails with the following error "fork/exec /usr/bin/ps: no such file or directory".
Here are a couple of examples: I1026 19:08:34.085818 18433 util.go:53] [ps -C kube-apiserver -o cmd --no-headers]: fork/exec /usr/bin/ps: no such file or directory
I1026 19:21:13.896322 25411 util.go:53] [ps -C kubelet -o cmd --no-headers]: fork/exec /usr/bin/ps: no such file or directory
The above error could lead to kube-bench reporting and error like the following: need apiserver executable but none of the candidates are running
or
need kubelet executable but none of the candidates are running
This happens when the host operating system places the ps command in the /usr/bin directory and this directory is also mapped to the container running kube-bench.
The following operating systems are an example of those:
RHEL / CentOS 7.x
RHEL / CentOS 8.x
Ubuntu 19.04 and 19.10
The problem with the ps command provided by the host OS is that the it was compiled as dynamically linked (uses shared libs) executable using the GLIBC library which is not compatible with the MUSL LIBC library provided by alpine the based image used to build kube-bench docker image.
There are situation where kube-bench is trying to execute the ps coammd and this call fails with the following error "fork/exec /usr/bin/ps: no such file or directory".
Here are a couple of examples:
I1026 19:08:34.085818 18433 util.go:53] [ps -C kube-apiserver -o cmd --no-headers]: fork/exec /usr/bin/ps: no such file or directory
I1026 19:21:13.896322 25411 util.go:53] [ps -C kubelet -o cmd --no-headers]: fork/exec /usr/bin/ps: no such file or directory
I1029 19:04:11.538900 20608 util.go:51] [ps -C kubelet -o cmd --no-headers]: exit status 127
The above error could lead to kube-bench reporting and error like the following:
need apiserver executable but none of the candidates are running
or
need kubelet executable but none of the candidates are running
This happens when the host operating system places the ps command in the /usr/bin directory and this directory is also mapped to the container running kube-bench.
The following operating systems are an example of those:
RHEL / CentOS 7.x
RHEL / CentOS 8.x
Ubuntu 19.04 and 19.10
The problem with the ps command provided by the host OS is that the it was compiled as dynamically linked (uses shared libs) executable using the GLIBC library which is not compatible with the MUSL LIBC library provided by alpine the based image used to build kube-bench docker image.
Alpine
RHEL 7.6 (OpenShift 3.10)
Ubuntu 19.04
The text was updated successfully, but these errors were encountered: