Skip to content

Commit

Permalink
(doc) More precise installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Minosity-VR committed Feb 5, 2025
1 parent 16e785d commit f425dd0
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
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

0 comments on commit f425dd0

Please sign in to comment.