First create and populate a .env file with the required variables:
cp deployments/kubehound/.env.tpl deployments/kubehound/.env
Edit the variables (datadog env DD_*
related and KUBEHOUND_ENV
):
KUBEHOUND_ENV
:dev
orrelease
DD_API_KEY
: api key you created from https://app.datadoghq.com/ website
Note:
KUBEHOUND_ENV=dev
will build the images locallyKUBEHOUND_ENV=release
will use prebuilt images from ghcr.io
To replicate the automated command and run KubeHound step-by-step. First build the application:
make build
Next create a configuration file:
collector:
type: live-k8s-api-collector
telemetry:
enabled: true
A tailored sample configuration file can be found here, a full configuration reference containing all possible parameters here.
Finally run the KubeHound binary, passing in the desired configuration:
bin/kubehound -c <config path>
Remember the targeted cluster must be set via kubectx
or setting the KUBECONFIG
environment variable. Additional functionality for managing the application can be found via:
make help