envoy-guide
Module 2 · Your First Envoy·10 min·beginner

Running Envoy in Docker

Boot Envoy with a minimal config and tour the admin UI.

The smallest possible Envoy

Envoy needs at least one config file to start. The absolute minimum is a config that opens nothing but the admin interface — Envoy's introspection / debug port. It's perfect as a "is this thing on?" smoke test.

Save this as envoy.yaml in any folder:

YAML
admin:
  address:
    socket_address:
      address: 0.0.0.0
      port_value: 9901

That's it. Eight lines. Envoy can boot on this.

Run it

The official image (envoyproxy/envoy) reads its config from /etc/envoy/envoy.yaml. Mount your file there:

Shell
docker run --rm -it \
  -p 9901:9901 \
  -v "$PWD/envoy.yaml:/etc/envoy/envoy.yaml" \
  envoyproxy/envoy:v1.31-latest

You should see Envoy's startup banner end with something like starting main dispatch loop. That's the "ready" signal.

Why mount the file?

The image bakes in a default config that proxies to httpbin.org. By mounting our own file at the same path, we override it with the admin-only config. You'll see this pattern in every lesson from here on.

The admin interface is your friend

Open http://localhost:9901 in a browser. You'll see a list of links — this is the admin UI, and it's the most underrated debugging tool in the whole project.

Hands-on · Tour the admin endpoints

Click through these in order. Don't worry about understanding everything yet — we'll use them constantly in later lessons.

  1. / — the index of all admin endpoints.
  2. /server_info — version, hot-restart epoch, command-line flags. "Is this the version I think it is?"
  3. /config_dump — the full effective config Envoy is running. Bigger than you'd expect because it includes defaults.
  4. /clusters — every cluster, every endpoint, with current health and per-endpoint stats. Single most useful page when something is broken.
  5. /stats — every counter, gauge, and histogram Envoy emits. /stats/prometheus is the same data in scrape format.
  6. /listeners — what sockets Envoy is listening on.

Spend three minutes clicking around. Even with our minimal config you'll see how much Envoy exposes by default — that's a feature, not noise.

Never expose 9901 publicly

The admin interface lets you read config, change log levels, and even trigger graceful restarts. Behind the firewall, on localhost only. Always. In production, bind it to 127.0.0.1.

Real-world example · Almost every Envoy outage post-mortem
Problem
An engineer is debugging weird latency at 2am. Is the right config loaded? Are endpoints healthy? Is one cluster melting? Without good introspection they have to guess and reload.
Envoy solution
The first thing they do is curl the admin interface: /clusters shows endpoint health, /stats shows counters per cluster, /config_dump proves what config is actually running. Triage drops from 30 minutes to 90 seconds.

What you've actually proven

This lesson looks small but it pins down a lot:

  • You have a working Envoy on your machine.
  • You know how to mount a config file into the container.
  • You know where the admin interface lives.
  • You've seen — even if you don't understand them yet — the endpoints you'll use to debug everything in the next 13 lessons.

Next up: we'll add a listener that actually accepts traffic and does something useful with it.

Quick check

Which port does the Envoy admin interface listen on by default in our examples?

Practical task
Finish the quick check and tick off the task to unlock.
Quick checkTasks 0/3