mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2026-02-14 10:00:14 +00:00
Read kubernetes version from environment (#390)
* Read kubernetes version from environment Set kubernetes version to the value of the environment variable `KUBE_BENCH_VERSION` if it is defined and the flag `--version` is not specified on the kube-bench command line. The command line flag `--version` takes precedence of the environment variable `KUBE_BENCH_VERSION` if both are defined. * Add info about KUBE_BENCH_VERSION to README
This commit is contained in:
committed by
Liz Rice
parent
a3b8ba58ad
commit
92df9cb36c
@@ -45,7 +45,10 @@ You can choose to
|
||||
kube-bench automatically selects which `controls` to use based on the detected
|
||||
node type and the version of kubernetes a cluster is running. This behaviour
|
||||
can be overridden by specifying the `master` or `node` subcommand and the
|
||||
`--version` flag on the command line.
|
||||
`--version` flag on the command line.
|
||||
|
||||
The kubernetes version can also be set with the KUBE_BENCH_VERSION environment variable.
|
||||
The value of `--version` takes precedence over the value of KUBE_BENCH_VERSION.
|
||||
|
||||
For example:
|
||||
run kube-bench against a master with version auto-detection:
|
||||
|
||||
Reference in New Issue
Block a user