1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2024-12-18 12:48:08 +00:00

docs: add Troubleshooting (#638)

* docs: add Troubleshooting

Adding basic instructions for running with debug logs

* docs: remember --logtostderr

* docs: note about cfg requirement

Note that installing a binary release is not sufficient - you also need the config and test files
Fixes #613
This commit is contained in:
Liz Rice 2020-07-15 14:41:35 +01:00 committed by GitHub
parent 20ec5d14f2
commit 4e00954485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,6 +38,7 @@ Table of Contents
* [Running on OpenShift](#running-on-openshift)
* [Output](#output)
* [Configuration](#configuration)
* [Troubleshooting](#troubleshooting)
* [Test config YAML representation](#test-config-yaml-representation)
* [Omitting checks](#omitting-checks)
* [Roadmap](#roadmap)
@ -68,7 +69,7 @@ By default, kube-bench will determine the test set to run based on the Kubernete
You can choose to
* run kube-bench from inside a container (sharing PID namespace with the host)
* run a container that installs kube-bench on the host, and then run kube-bench directly on the host
* install the latest binaries from the [Releases page](https://github.com/aquasecurity/kube-bench/releases),
* install the latest binaries from the [Releases page](https://github.com/aquasecurity/kube-bench/releases), though please note that you also need to download the config and test files from the `cfg` directory
* compile it from source.
## Running kube-bench
@ -301,6 +302,12 @@ Any settings in the version-specific config file `cfg/<version>/config.yaml` tak
You can read more about `kube-bench` configuration in our [documentation](docs/README.md#configuration-and-variables).
## Troubleshooting
Running `kube-bench` with the `-v 3 --logtostderr` parameters will generate debug logs that can be very helpful for debugging problems.
If you are using one of the example `job*.yaml` files, you will need to edit the `command` field, for example `["kube-bench", "-v", "3", "--logtostderr"]`. Once the job has run, the logs can be retrieved using `kubectl logs` on the job's pod.
## Test config YAML representation
The tests (or "controls") are represented as YAML documents (installed by default into `./cfg`). There are different versions of these test YAML files reflecting different versions of the CIS Kubernetes Benchmark. You will find more information about the test file YAML definitions in our [documentation](docs/README.md).