From 2e7d3d047d8b5dab5db2ae0669ec60597f54846a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Fri, 13 Dec 2024 21:20:48 +0100 Subject: [PATCH] kic: add /debug/config/raw-error mention for KIC 3.4+ (#8247) kic: add /debug/config/raw-error mention --- .../reference/troubleshooting.md | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/_src/kubernetes-ingress-controller/reference/troubleshooting.md b/app/_src/kubernetes-ingress-controller/reference/troubleshooting.md index 8e50c892009b..d8334969502f 100644 --- a/app/_src/kubernetes-ingress-controller/reference/troubleshooting.md +++ b/app/_src/kubernetes-ingress-controller/reference/troubleshooting.md @@ -200,10 +200,9 @@ successfully, reviewing the generated configuration manually and/or applying it in a test environment can help locate potential causes. Under normal operation, the controller does not store generated configuration; -it is only sent to Kong's Admin API. The `--dump-config` flag enables a -diagnostic mode where the controller also saves generated configuration to a -temporary file. You can retrieve this file via the web interface of the diagnostic -server at `host:10256/debug/config`. +it is only sent to Kong's Admin API. +The `--dump-config` flag enables a diagnostic mode where the controller also saves generated configuration and {{ site.base_gateway }} responses to memory. +You can retrieve these via the web interface of the diagnostic server at `host:10256/debug/config`. To use the diagnostic mode: @@ -232,6 +231,14 @@ To use the diagnostic mode: curl -svo last_good.json localhost:10256/debug/config/successful curl -svo last_bad.json localhost:10256/debug/config/failed ``` +{% if_version gte:3.4.x %} +1. Retrieve the last error response body received from {{ site.base_gateway }}: + ```bash + curl -svo raw_error_body.json localhost:10256/debug/config/raw-error + ``` +{% endif_version %} + +### Using dumped configuration Once you have dumped configuration, take one of the following approaches to isolate issues: @@ -251,6 +258,8 @@ approaches to isolate issues: Once this image is running, run `curl http://localhost:8001/config @last_bad.json` to try applying the configuration and see any errors. +You can also analyze the returned error response body from {{ site.base_gateway }} to understand the issue. + ## Inspecting network traffic with a tcpdump sidecar Inspecting network traffic allows you to review traffic between the ingress