Document updated on Jun 6, 2021
Running KrakenD
From an operations point of view, KrakenD is very simple to use. It only requires you to pass the path to the configuration file(s) which define behaviors and endpoints.
Make sure KrakenD can find a krakend.json and a LICENSE file. You can create an initial krakend.json with the following content:
Create a minimal configuration file
$echo '{ "version": 2 }' > krakend.jsonAnd then run the container (AWS example):
Running KrakenD using the Docker container
$docker run -p 8080:8080 -v "$PWD:/etc/krakend/" krakend/krakend-ee:2.11.3 run --config /etc/krakend/krakend.json --accept-eulaBasic usage
- Generate a configuration file with your endpoints definition. The easier way to generate it is using the designer
- Check the syntax of your krakend.jsonis goodSyntax checking $krakend check -t --config krakend.json --debug
- Run KrakenDStart the server $krakend run -c krakend.json -d
The flag -c is the short version of --config and -d the short version of --debug which allows
you to find problems easily.
Using KrakenD
To start KrakenD make sure to provide the path to the binary or add it to the PATH if using the non-Docker installation. KrakenD has the following options:
The krakend command
$krakend
╓▄█                          ▄▄▌                               ╓██████▄µ
▐███  ▄███╨▐███▄██H╗██████▄  ║██▌ ,▄███╨ ▄██████▄  ▓██▌█████▄  ███▀╙╙▀▀███╕
▐███▄███▀  ▐█████▀"╙▀▀"╙▀███ ║███▄███┘  ███▀""▀███ ████▀╙▀███H ███     ╙███
▐██████▌   ▐███⌐  ,▄████████M║██████▄  ║██████████M███▌   ███H ███     ,███
▐███╨▀███µ ▐███   ███▌  ,███M║███╙▀███  ███▄```▄▄` ███▌   ███H ███,,,╓▄███▀
▐███  ╙███▄▐███   ╙█████████M║██▌  ╙███▄`▀███████╨ ███▌   ███H █████████▀
                     ``                     `'`
Version: v1.3.0
The API Gateway builder
Usage:
  krakend [command]
Available Commands:
  check       Validates that the configuration file is valid.
  generate    Generates static content for several functionalities. See subcommands.
  help        Help about any command
  run         Run the KrakenD server.
Flags:
  -c, --config string   Path to the configuration filename
  -d, --debug           Enable the debug
  -h, --help            help for krakend
Use "krakend [command] --help" for more information about a command.As you can see there are 3 different supported commands:
- krakend check(syntax validation)
- krakend run(run the server)
- krakend generate(generates OpenAPI, Postman and other specs)
- krakend help(show usage)

