A simple, reliable utility built with Flask to inspect and debug incoming HTTP request headers. Whether you are troubleshooting a complex Ingress setup, verifying Load Balancer behavior, or testing connectivity between microservices, this app provides the immediate feedback you need.
- Infrastructure Auditing: See exactly what headers your Ingress controller or Proxy is adding/modifying (e.g.,
X-Forwarded-For,X-Real-IP). - Connectivity Validation: Quickly verify that your network path is open and your pods are reachable.
- Ready-to-go: Lightweight, containerized, and configured for both Docker and Kubernetes right out of the box.
The fastest way to get running is using Docker Hub:
# Run locally on port 9007
docker run -p 9007:9007 dvklvk/header-echo-app:latestIf you prefer Compose, just run:
docker-compose up -dTo stop and clean up: docker-compose down
GET /header-echo/health
Response: {"status": "healthy"}
ANY /header-echo/<any-path>
This endpoint catches all methods (GET, POST, etc.) and echoes back everything it receives.
Example Request:
curl -H "X-Debug: Senior-Engineer" http://localhost:9007/header-echo/debug-testExample Response:
{
"headers": {
"Host": "localhost:9007",
"User-Agent": "curl/8.1.2",
"X-Debug": "Senior-Engineer"
},
"message": "Headers received successfully",
"method": "GET",
"path": "/debug-test"
}This project is tailored for Kubernetes debugging. Resources are isolated in the header-echo namespace.
Apply all manifests in the k8s/ directory:
make k8s-applyThis sets up a Namespace, Deployment, Service, and Ingress.
- Port Forwarding:
kubectl port-forward svc/header-echo 9007:80 -n header-echo - Ingress:
- Enable the addon:
minikube addons enable ingress - Start the tunnel:
minikube tunnel(keep this running) - Access via:
http://127.0.0.1/header-echo
- Enable the addon:
Note for WSL2 Users: If you are using the
dockerdriver, the Minikube IP is not directly routable from Windows.minikube tunnelbridges the Ingress to127.0.0.1, so uselocalhostinstead of the Minikube IP.
make k8s-deleteThe app can be tuned via environment variables:
| Variable | Default | Purpose |
|---|---|---|
PORT |
9007 |
The port the app listens on. |
APP_PREFIX |
/header-echo |
The base path for the API. |
A Makefile is included to streamline your workflow:
make build: Build the image locally.make push: Push the image to your registry.make k8s-apply: Deploy the full K8s stack.make k8s-delete: Teardown everything.
Distributed under the MIT License. See LICENSE for more information.
Crafted for Platform Engineers by a Senior Platform Engineer.