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

(doc) More precise installation instructions #327

Merged
merged 3 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,9 @@ To run KubeHound, you need a couple dependencies
+ [Docker](https://docs.docker.com/engine/install/) `>= 19.03`
+ [Docker Compose](https://docs.docker.com/compose/compose-file/compose-versioning/) `V2`

### Install and run
### Install

Select a target Kubernetes cluster, either:
* Using [kubectx](https://github.com/ahmetb/kubectx)
* Using specific kubeconfig file by exporting the env variable: `export KUBECONFIG=/your/path/to/.kube/config`
#### From Release

Download binaries are available for Linux / Windows / Mac OS via the [releases](https://github.com/DataDog/KubeHound/releases) page or by running the following (Mac OS/Linux):
```bash
Expand All @@ -32,10 +30,43 @@ If downloading the releases via a browser you must run e.g `xattr -d com.apple.q

</details>

#### With homebrew

KubeHound is available in homebrew-core and you can simply run
```bash
brew update && brew install kubehound
```

`kubehound` should now be in your path.

#### From source

Then, simply run
If you wish to build KubeHound from source, you will need to checkout a tag before building
```bash
git clone https://github.com/DataDog/KubeHound.git
cd KubeHound
git checkout $(git describe --tags --abbrev=0)
make build
```

KubeHound binary will be output to `./bin/build/kubehound`.

### Run

Select a target Kubernetes cluster, either:
* Using [kubectx](https://github.com/ahmetb/kubectx)
* Using specific kubeconfig file by exporting the env variable: `export KUBECONFIG=/your/path/to/.kube/config`

Then, simply run the `kubehound` binary:
```bash
# If you installed it from brew, it is in your path
kubehound

# If you installed it from release, it should be were you downloaded it
./kubehound

# If you installed it from source, it should be in the <repo_path>/bin/build folder
./bin/build/kubehound
```

For more advanced use case and configuration, see
Expand Down
9 changes: 9 additions & 0 deletions docs/dev-guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,18 @@ kubehound dev --down
To build KubeHound locally from the sources, use the Makefile:

```bash
# Ensure you are pulling a release tag
git checkout tags/vX.X.X
# Build the binary
make build
```

!!! note

While building the binary using a `main` revision, the binary will not be able
to spin up the KubeHound stack. You should use a release tag to build the binary or
use the `kubehound dev` command to spin up the dev stack.

KubeHound binary will be output to `./bin/build/kubehound`.

### Releases
Expand Down
Loading