If you used the kong/deck Docker image to install decK, you can use the same Docker image to manage decK.
Adjust KONG_ADMIN_HOST
and the port 8001
in the following examples to the
host and port of your own Kong Gateway instance.
If you used the kong/deck Docker image to install decK, you can use the same Docker image to manage decK.
Adjust KONG_ADMIN_HOST
and the port 8001
in the following examples to the
host and port of your own Kong Gateway instance.
Run this command to export the kong.yaml
file:
docker run -i \
-v $(pwd):/deck \
kong/deck \
--kong-addr http://KONG_ADMIN_HOST:8001 \
--headers kong-admin-token:KONG_ADMIN_TOKEN \
-o /deck/kong.yaml gateway dump
Where $(pwd)/kong.yaml
is the path to a kong.yaml
file.
Run this command to export objects from all the workspaces:
docker run -i \
-v $(pwd):/deck \
--workdir /deck \
kong/deck \
--kong-addr http://KONG_ADMIN_HOST:8001 \
--headers kong-admin-token:KONG_ADMIN_TOKEN \
-o /deck/kong.yaml gateway dump \
--all-workspaces
Run this command to initialize Kong objects:
docker run -i \
-v $(pwd):/deck \
kong/deck \
--kong-addr http://KONG_ADMIN_HOST:8001 \
--headers kong-admin-token:KONG_ADMIN_TOKEN \
gateway reset
Run this command to import kong.yaml
:
docker run -i \
-v $(pwd):/deck \
kong/deck \
--kong-addr http://KONG_ADMIN_HOST:8001 \
--headers kong-admin-token:KONG_ADMIN_TOKEN \
gateway sync /deck/kong.yaml
In this example, kong.yaml
is in $(pwd)/kong.yaml
.
Run this command to view all available commands:
docker run kong/deck --help
Run the following to check available command flags:
docker run kong/deck gateway dump --help
docker run kong/deck gateway sync --help
docker run kong/deck gateway reset --help