From the functional point of view, KrakenD only needs a single configuration file to build the gateway you want. That file could be defined using the
--config path and in the
service.yml configuration file. If no value is defined, KrakenD will try to load the configuration file from the default path,
The following formats are supported to write the configuration file:
JSON at the moment, and this is why we recommend using JSON at least in the experimenting phase.
Validating the syntax of the configuration file
Let’s say you are modifying by hand the file
~/my-krakend.json. When you are set, you can check the syntax of the file by running:
krakend --config ~/my-krakend.json check
By adding the flag
--debug you will be able to see the full output with the interpretation of the file:
krakend --config ~/my-krakend.json --debug
Of course you can try to start the service directly as this will be done anyway. When the syntax is correct you’ll see the message
The configuration file contains a lot of different options that are explained here. Let’s dip a toe in the water first by reviewing the skeleton of the configuration file.