Document updated on Jun 6, 2021
Running KrakenD
After installing KrakenD, you can start using it by typing krakend help
:
The krakend command
$krakend
╓▄█ ▄▄▌ ╓██████▄µ
▐███ ▄███╨▐███▄██H╗██████▄ ║██▌ ,▄███╨ ▄██████▄ ▓██▌█████▄ ███▀╙╙▀▀███╕
▐███▄███▀ ▐█████▀"╙▀▀"╙▀███ ║███▄███┘ ███▀""▀███ ████▀╙▀███H ███ ╙███
▐██████▌ ▐███⌐ ,▄████████M║██████▄ ║██████████M███▌ ███H ███ ,███
▐███╨▀███µ ▐███ ███▌ ,███M║███╙▀███ ███▄```▄▄` ███▌ ███H ███,,,╓▄███▀
▐███ ╙███▄▐███ ╙█████████M║██▌ ╙███▄`▀███████╨ ███▌ ███H █████████▀
`` `'`
Version: v2.0
KrakenD is a declarative high-performance API gateway that helps you effortlessly adopt microservices
Usage:
krakend [command]
Available Commands:
check Validates that the configuration file is valid.
check-plugin Checks your plugin dependencies are compatible.
e2e Executes an end to end test for the gateway based on the configuration file and a set of specs.
generate Generates static content for several functionalities. See subcommands.
help Help about any command
run Runs the KrakenD server.
Flags:
-h, --help help for krakend
Use "krakend [command] --help" for more information about a command.
To see all the options of a command type krakend help <COMMAND>
or krakend <COMMAND> -h
.
To start the server, invoke the krakend run
command. The command will require a configuration file with your API definition. You can create your first krakend.json
file using the KrakenDesigner if you prefer a UI.
Make sure KrakenD can find a krakend.json
and a LICENSE
file in the same place where it is executed (workdir).
To get started right away, you can paste the following content inside a krakend.json
file:
{
"$schema": "https://www.krakend.io/schema/v3.json",
"version": 3
}
And then you can start KrakenD:
Command to start KrakenD
$krakend run -c krakend.json
Or if you use Docker:
Running KrakenD using the Docker container
$docker run -p 8080:8080 -v "$PWD:/etc/krakend/" krakend/krakend-ee:2.0 run --config /etc/krakend/krakend.json
Now KrakenD is listening on 8080
, and you can see it working under http://localhost:8080/__health
.