Skip to main content

Golden Microservice: A Minimal Template for Testing Deploys

·249 words·2 mins
Stanislav Cherkasov
Author
Stanislav Cherkasov
Architecture | Kubernetes | Terraform
devops-tooling - This article is part of a series.
Part : This Article

I found myself writing the same “Hello World” Python web server for the 50th time.

Every time I need to test a new Kubernetes Ingress, debug a service mesh, or verify that my Docker container is picking up environment variables correctly, I need a target app. It needs to be:

  1. Fast: No heavy frameworks.
  2. Configurable: I need to change ports without rebuilding.
  3. Chatty: It should echo back the environment variables I care about.
  4. Healthy: It needs separate endpoints for traffic and health checks.

Existing images like hashicorp/http-echo are great but often too limited. Real apps are too heavy.

So I wrote golden-microservice.

What it does
#

It’s a tiny Python application that listens on two ports:

  • Traffic Port (8080): Returns current environment variables (configurable via VARS_LIST).
  • Status Port (8081): Returns a specific HTTP status code.

That’s it.

Why I use it
#

I don’t use it for production traffic. I use it to validate platform behavior.

When I deploy it to Kubernetes, I can instantly verify:

  • Are my ConfigMaps injecting variables correctly?
  • Is the Liveness Probe hitting port 8081?
  • Is the Load Balancer routing traffic to 8080?

Running it
#

docker run -d -P \
  -e ENV=staging \
  -e CLUSTER=eu-west-1 \
  -e VARS_LIST="ENV,CLUSTER,HOSTNAME" \
  ghcr.io/tenhishadow/golden-microservice:latest

When you curl it, you get exactly what you need to debug:

golden-microservice Listen on port 8080
ENV to show: ENV is staging CLUSTER is eu-west-1 HOSTNAME is 47bb23bb7bf5

It’s a solved problem. I don’t debug the test app anymore; I just use it.

Looking for a Senior DevOps or DevSecOps?

I help companies modernize their infrastructure, optimize Cloud/On-Premise costs, and build secure DevSecOps cultures.

devops-tooling - This article is part of a series.
Part : This Article