Closed
Description
Description
When you run the trivy k8s
command, there is no option to specify an alternative kubeconfig
file path.
By default, the kubeconfig file resides in $HOME/.kube/config
.
However, users of Kubernetes often need to specify a different path, using a parameter like --kubeconfig
on the kubectl
command.
If you don't have the kubeconfig in the default filesystem path, then the error below is received.
root@trivy:~# trivy k8s --report summary cluster
2022-07-15T08:25:43.301Z FATAL get k8s artifacts error: Get "http://localhost:8080/api?timeout=32s": dial tcp [::1]:8080: connect: connection refused
Solution
Please add --kubeconfig
as an argument / parameter for the trivy k8s
command.
Activity