Using the decK configuration file

Uses: Kong Gateway
TL;DR

How do I use a config file to store decK’s global connection parameters?

decK reads global settings such as the Kong host and Admin token from a config file — $HOME/.deck.yaml by default, or a different file passed with --config. Use the sample config on GitHub as a starting point and set only the parameters you need, for example kong-addr, headers, and tls-skip-verify.

Problem

decK supports using a config file to store global parameters such as the Kong host & Admin token.How can this be configured to switch easily between environments?

Solution

The default configuration file used is $HOME/.deck.yaml.

If this does not exist it can be created using the sample provided here.


kong-addr: http://kong-instance1:8001
headers:
- "kong-admin-token: xyz"
- "kong-debug:1"
no-color: false
verbose: 0

tls-skip-verify: false
ca_cert :

To specify a different file to use you can pass in the --config parameter

./deck --config /deck/qa.yml

A list of available options is below:

Parameter

Description

kong-addr HTTP Address of Kong’s Admin API.
headers HTTP Headers(key:value) to inject in all requests to Kong’s Admin API
tls-server-name Name to use to verify the hostname in Kong’s Admin TLS certificate
ca-cert Custom CA certificate (raw contents) to use to verify Kong’s Admin TLS certificate
ca-cert-file Path to a custom CA certificate to use to verify Kong’s Admin TLS certificate
verbose Enable verbose logging levels. Setting this value to 2 outputs all HTTP requests/responses between decK and Kong
no-color disable colorized output
skip-workspace-crud Skip API calls related to Workspaces (Kong Gateway Enterprise only)
konnect-email Email address associated with your Konnect account
konnect-password Password associated with your Konnect account
konnect-password-file File containing password to your Konnect account
tls-skip-verify Disable verification of Kong’s Admin TLS certificate
kong-cookie-jar-path Absolute path to a cookie-jar file in the Netscape cookie format for auth with Admin Server. You may also need to pass in as header the User-Agent that was used to create the cookie-jar
analytics Share anonymized data to help improve decK
timeout Set a request timeout for the client to connect with Kong (in seconds)
tls-client-cert Path to the file containing TLS client certificate to use for authentication with Kong’s Admin API. This value can also be set using DECK_TLS_CLIENT_CERT_FILE environment variable. Must be used in conjunction with tls-client-key-file
tls-client-key Path to file containing the private key for the corresponding client certificate. This value can also be set using DECK_TLS_CLIENT_KEY_FILE environment variable. Must be used in conjunction with tls-client-cert-file
konnect-addr Address of the Konnect endpoint
konnect-control-plane-name Konnect Control Plane name (renamed from konnect-runtime-group-name in current decK versions)

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!