Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: exec /usr/local/bin/kube-bench: exec format error #1594

Open
eravindar12 opened this issue Apr 6, 2024 · 5 comments
Open

Bug: exec /usr/local/bin/kube-bench: exec format error #1594

eravindar12 opened this issue Apr 6, 2024 · 5 comments

Comments

@eravindar12
Copy link

Overview

I am trying to integrate AWS security Hub, and I've encountered the following issue, do you have any suggestions on how to resolve it, please ?

❯ kubectl get all -n kube-bench
NAME                   READY   STATUS   RESTARTS   AGE
pod/kube-bench-86sdd   0/1     Error    0          17m
pod/kube-bench-bcrg4   0/1     Error    0          15m
pod/kube-bench-m4hjq   0/1     Error    0          12m
pod/kube-bench-mqjjt   0/1     Error    0          17m
pod/kube-bench-rz4nc   0/1     Error    0          17m
pod/kube-bench-x2gq6   0/1     Error    0          7m7s
pod/kube-bench-x6fhj   0/1     Error    0          16m

NAME                   COMPLETIONS   DURATION   AGE
job.batch/kube-bench   0/1           17m        17m
❯ kubectl logs -f pod/kube-bench-86sdd -n kube-bench
exec /usr/local/bin/kube-bench: exec format error

❯ kubectl logs -f job.batch/kube-bench -n kube-bench
Found 7 pods, using pod/kube-bench-rz4nc
exec /usr/local/bin/kube-bench: exec format error

Environment

[What is your version of kube-bench? (run kube-bench version)]

v0.7.2

[What is your version of Kubernetes? (run kubectl version )]

eks 1.29

@chen-keinan
Copy link
Contributor

@eravindar12 how did you deployed the pod with kube-bench? have you compiled the binary by yourself ?

@eravindar12
Copy link
Author

eravindar12 commented Apr 7, 2024

@chen-keinan - JFYI, I have followed the steps outlined in the official kube-bench documentation and then updated the image tag accordingly. Subsequently, I deployed job-eks-asff.yaml into the EKS cluster.

https://github.com/aquasecurity/kube-bench/blob/main/docs/running.md#running-cis-benchmark-in-an-eks-cluster

https://github.com/aquasecurity/kube-bench/blob/main/docs/asff.md

I've configured permissions within an IAM Role using IRSA (IAM Role for Service Accounts) by following below example

https://hayao-k.dev/integration-of-aws-security-hub-and-kube-bench#configue-iam-roles

@chen-keinan
Copy link
Contributor

@eravindar12 the error message implies on binary compiled with wrong OS or ARCH

@eravindar12
Copy link
Author

@chen-keinan Could you please provide guidance on resolving the error message indicating that the binary was compiled with the wrong OS or archticture? Thank you.

I am using EKS version 1.29

@chen-keinan
Copy link
Contributor

chen-keinan commented Apr 8, 2024

@eravindar12 can you confirm that you have compiled kube-bench binary by yourself ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants