Install the pre-compiled binary, use Docker, or compile from source.
Install the pre-compiled binary¶
Install the pre-compiled binary via one of the following methods.
brew install peter-evans/kdef/kdef
go install github.com/peter-evans/kdef@latest
Install a specific version by using a suffix in the format
Download the pre-compiled binaries from the releases page and copy them to the desired location.
If you would like to see the kdef binary released via a method not listed please make an issue to discuss its feasibility.
Running with Docker¶
kdef can also be executed within a Docker container.
docker run --rm \ -v $PWD:/var/opt/kdef/my-cluster \ peterevans/kdef \ apply "/var/opt/kdef/my-cluster/resources/**/*.yml" \ --config-path="/var/opt/kdef/my-cluster/config.yml" \ --dry-run
If connecting to a locally running Kafka cluster you may need to use
--net=host to run the container in the host network.
Compiling from source¶
If you would like to build from source follow these steps:
git clone https://github.com/peter-evans/kdef cd kdef
go mod tidy
go build -o kdef .
Until kdef reaches
v1.0.0 and is considered stable, there could be breaking changes in minor releases. Make sure to check the release notes before updating.