Hello, everyone.
For testing purposes I’m running community KrakenD v2.8.0 in a docker container through docker desktop on my Windows laptop.
I have a healthcheck endpoint on one of my development APIs. The API server has a self signed certificate. I have the cert in the docker container. Here is my dockerfile I’m using to build the image (I redacted the name of the certificate)
FROM devopsfaith/krakend:latest
WORKDIR /etc/krakend
COPY certs/xxxxx-CA.crt /usr/local/share/ca-certificates/xxxxx-CA.crt
COPY krakend.json /etc/krakend/krakend.json
EXPOSE 8080
CMD ["run", "-c", "/etc/krakend/krakend.json", "-d"]
I can call the healthcheck endpoint from Postman without issue, but when I try to use KrakenD, I get this error (I redacted the servername):
2024-12-16 15:05:09 Error #01: Get https://xxxxx.com/health: EOF
Here is my configuration json with the server names redacted.
{
"$schema": https://www.krakend.io/schema/krakend.json,
"version": 3,
"name": "KrakenD - API Gateway",
"timeout": "3000ms",
"cache_ttl": "300s",
"client_tls": {
"allow_insecure_connections": true
},
"output_encoding": "json",
"endpoints": [
{
"endpoint": "/xxxx/healthcheck",
"method": "GET",
"output_endcoding": "no-op",
"backend": [
{
"url_pattern": "/health",
"encoding": "no-op",
"method": "GET",
"host": [
]
}
]
}
]
}
When using postman, I get this JSON response (I redacted server names)
{
"status": "Healthy",
"totalDuration": "00:00:00.2688315",
"entries": {
"appsettings.json": {
"data": {},
"description": "Appsetting file available.",
"duration": "00:00:00.0019721",
"status": "Healthy",
"tags": []
},
"log.config": {
"data": {},
"description": "log file available.",
"duration": "00:00:00.0089037",
"status": "Healthy",
"tags": []
},
"XXXXXDatabase": {
"data": {},
"description": "XXXXX Database context available",
"duration": "00:00:00.2636065",
"status": "Healthy",
"tags": []
},
"ZZZZZDatabase": {
"data": {},
"description": "ZZZZZ Database context available",
"duration": "00:00:00.2550604",
"status": "Healthy",
"tags": []
}
}
}
I’m sure I’ve made a simple mistake, but I’m not seeing it. Any and all help is appreciated.