Document updated on Jan 15, 2019
All different types of plugins let you freely implement your logic without restrictions. To start using your own plugins make sure to write them implementing the right interface and compile them respecting the requirements.
Writing, compiling and using plugins need to comply with the following list:
As your custom plugins need to match the Go and libraries versions used to build KrakenD, you have to make sure your plugin is compatible by checking your go.sum
file with the command check-plugin
(read the documentation)
$krakend check-plugin -v 1.17.0 -s ../myplugin/go.sum
1 incompatibility(ies) found...
go
have: 1.17.0
want: 1.16.4
Once your plugin is written with the plugin type interface you have chosen, compile it in the same architecture type as follows:
$go mod init yourmodulename
go build -buildmode=plugin -o yourplugin.so .
The official KrakenD container uses Alpine as the base image. Therefore, when compiling your plugins inside a Docker that extends the official image with a go-alpine builder, you will need to install at least the following requirements in the Dockerfile
:
RUN apk add make gcc musl-dev
Once you have developed your plugin is time to inject it in the configuration.
The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.
We use cookies to understand how you use our site and to improve your overall experience. By continuing to use our site, you accept our Privacy Policy. More information