Prerequisite: Before starting this tutorial, make sure your Aegis gateway and Envoy are up and running. Follow the Getting Started guide first — this tutorial picks up from a working gateway.
This tutorial walks through deploying a simple whoami web service and exposing it over HTTPS through Envoy, using Aegis's built-in Local CA — no public domain or open ports required.
You will:
whoami container alongside Aegis + Envoy/etc/hosts entryhttps://whoami.local from your browserhttp://localhost:8765/etc/hosts entry on your machineStart whoami as a standalone container with a published port:
docker run -d --name whoami -p 8081:80 --restart unless-stopped traefik/whoami
It runs independently — no changes to your existing docker-compose.yml needed.
Open the Aegis dashboard → Gateway → Clusters → Add Cluster.
| Field | Value |
|---|---|
| Name | whoami |
| Type | STRICT_DNS |
| Host | host.docker.internal |
| Port | 8081 |
| Connect timeout | 5s |
| DNS Lookup Family | V4_ONLY |
Save — Aegis pushes the cluster to Envoy immediately.
Go to Certificates → Signing Providers → Add Provider, choose Local CA, give it a name (e.g. Local CA), and save.
Go to Certificates → Managed Certs → Issue Certificate:
| Field | Value |
|---|---|
| Domain | whoami.local |
| Provider | Local CA |
| Auto-renew | on |
Click Issue. The cert is generated and pushed to Envoy SDS within a second. Note the secret name shown (e.g. tls-whoami-local).
Go to Gateway → Listeners → https_listener → Edit.
Click Add Filter Chain and fill in:
| Field | Value |
|---|---|
| Domain(s) | whoami.local |
| Backend Cluster | whoami |
| TLS Secret | tls-whoami-local (or the name shown on the cert page) |
Leave Route Prefix as / and click Add. Envoy picks up the new filter chain within ~1 second.
Download the Root CA certificate and install it in your OS trust store.
macOS:
curl -s http://localhost:8765/api/certs/ca -o aegis-local-ca.crt sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain aegis-local-ca.crt
Linux:
curl -s http://localhost:8765/api/certs/ca -o aegis-local-ca.crt sudo cp aegis-local-ca.crt /usr/local/share/ca-certificates/aegis-local-ca.crt sudo update-ca-certificates
Windows (PowerShell as Administrator):
Invoke-WebRequest http://localhost:8765/api/certs/ca -OutFile aegis-local-ca.crt Import-Certificate -FilePath aegis-local-ca.crt -CertStoreLocation Cert:\LocalMachine\Root
Restart your browser after installing the CA.
/etc/hosts entryMap whoami.local to the IP address of the machine running Envoy:
127.0.0.1192.168.1.100)# Local machine echo "127.0.0.1 whoami.local" | sudo tee -a /etc/hosts # Or remote host (replace with actual IP) echo "192.168.1.100 whoami.local" | sudo tee -a /etc/hosts
On Windows, edit C:\Windows\System32\drivers\etc\hosts as Administrator.
Navigate to https://whoami.local.
You should see the whoami response — hostname, IP, headers — served over HTTPS with a valid (locally trusted) certificate and no browser warning.
Browser → https://whoami.local:443
│ SNI = whoami.local
▼
Envoy (port 10443)
│ filter chain match: whoami.local
│ TLS: cert from Aegis SDS (signed by Local CA)
▼
whoami container (port 80)
Aegis issued the cert from its internal Root CA, pushed it to Envoy via xDS SDS, and Envoy presented it during the TLS handshake. Your browser trusted it because you installed the Root CA.
To remove the setup:
https_listenerwhoami cluster/etc/hosts linedocker rm -f whoami