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

Error to read kubeconfig with trivy #5794

Open
chen-keinan opened this issue Dec 18, 2023 Discussed in #5769 · 0 comments
Open

Error to read kubeconfig with trivy #5794

chen-keinan opened this issue Dec 18, 2023 Discussed in #5769 · 0 comments
Assignees
Labels
target/kubernetes Issues relating to kubernetes cluster scanning triage/support Indicates an issue that is a support question.

Comments

@chen-keinan
Copy link
Contributor

Discussed in #5769

Originally posted by pczanwar December 9, 2023

Question

FATAL failed getting k8s cluster: stat $HOME/.kube/dev.yml: no such file or directory
I have the yaml file in the path(kubeconfig)
My versions for kubectl and trivy are -
docker run --rm -v ${pwd}/tmp:/root/.cache/ -v //var/run/docker.sock:/var/run/docker.sock aquasec/trivy --version
Version: 0.48.0
kubectl.exe version
Client Version: v1.28.2
Here is the command i am trying to run -

docker run --rm -v ${pwd}/tmp:/root/.cache/ -v //var/run/docker.sock:/var/run/docker.sock aquasec/trivy:latest k8s --kubeconfig ~/.kube/dev.yml --report summary cluster -s HIGH

error is -

$ docker run --rm -v ${pwd}/tmp:/root/.cache/ -v //var/run/docker.sock:/var/run/docker.sock aquasec/trivy k8s --kubeconfig ~/.kube/advdev.yml --report summary cluster -s HIGH
2023-12-09T00:06:03.331Z FATAL failed getting k8s cluster: stat C:/XXX/YYYYYY/.kube/dev.yml: no such file or directory

File: /c/XXX/YYYYYY/.kube/dev.yml
Size: 6692 Blocks: 8 IO Block: 65536 regular file
Device: 788eb514h/2022618388d Inode: 2251799813728761 Links: 1
Access: (0644/-rw-r--r--) Uid: (3706294/prashant.zanwar) Gid: (1049089/ UNKNOWN)
Access: 2023-12-08 19:07:59.039528000 -0500
Modify: 2023-12-08 18:35:09.809407100 -0500
Change: 2023-12-08 19:07:59.177812900 -0500
Birth: 2023-12-08 19:07:59.052437900 -0500

Please advice --

Target

None

Scanner

None

Output Format

None

Mode

None

Operating System

No response

Version

No response

@chen-keinan chen-keinan added triage/support Indicates an issue that is a support question. target/kubernetes Issues relating to kubernetes cluster scanning labels Dec 18, 2023
@chen-keinan chen-keinan self-assigned this Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
target/kubernetes Issues relating to kubernetes cluster scanning triage/support Indicates an issue that is a support question.
Projects
None yet
Development

No branches or pull requests

1 participant