krakend check command validates KrakenD configuration files written in any of its supported formats.
It’s able to perform three things:
check command can guarantee that a configuration is valid with the three validations.
TL;DR: Add the following line before deploying:
See the usage below.
krakend check command accepts the following options:
krakend check in combination with the following flags:
--configto specify the path to the configuration file in any of the supported formats, or to the starting template if used in combination with flexible configuration.
--debug(optional) to enable the debug and see information about how KrakenD is interpreting your configuration file. Use from 1 to 3 levels of verbosity using
--test-gin-routes(optional) to test the configuration by trying to start the service for a second. This option is highly recommended as it prevents conflicting routes and other problems unrelated to the linting itself and would end up in a panic.
--lint(optional) to check that your configuration file is properly linted and does not contain unrecognized options or wrong types. Your configuration must be in JSON format. When using Flexible Configuration, you cannot check directly the .
krakend.tmplfile, you need to do it in a second round using the content of the
FC_OUTfile. This option requires Internet access as the schema is published online under
--indent(optional) in combination with
-d, to change the indentation when the debug information renders (default:
-i "#"uses a hash instead of a tab for every nesting level.
krakend runwill run any syntax-valid file, ignoring unknown configuration keys. Use the
--lintflag in the check command to find incorrect entries.
You can use three different verbosity levels with the
-d') flag. The levels are -d
, and -ddd`. When used a single time, you get the most relevant information after parsing the configuration, when you add more, you get more and more details. The following example shows the debug of a configuration with one endpoint:
The same example with the verbosity level 2 (
-dd) adds more information in the global settings (like the TLS section) and shows the configuration of the extra_config. The endpoints and the backends also show more information:
And in level 3 (
-ddd), there is everything that KrakenD could parse from 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.