Qovery’s built-in controls focus on ingress. Per-application egress domain filtering is handled at the Kubernetes level using a dedicated forward proxy.
How it works
The approach has three parts:- Squid forward proxy — runs inside the cluster as a container service and enforces a domain allowlist
- App environment variables — tell your application to route all outbound traffic through the proxy
- Kubernetes NetworkPolicy (optional) — prevents the application from bypassing the proxy by talking directly to the internet
Prerequisites
- A Qovery environment with at least one application running
- A list of domains your application needs to reach
Step 1: Deploy Squid as a container service
Create a new Container service in your Qovery environment using theubuntu/squid image.
Configure the service
| Setting | Value |
|---|---|
| Image | ubuntu/squid |
| Port | 3128 (do not expose publicly) |
Pass the Squid configuration as a file variable
Rather than baking a config into a custom image, pass yoursquid.conf as a file variable mounted directly into the container.
In Qovery, create a new variable with:
| Field | Value |
|---|---|
| Name | SQUID_CONF (or any name) |
| Type | File |
| Mount path | /etc/squid/squid.conf |
| Value | (the squid.conf content below) |
.example.com and .another-service.com with the domains your application actually needs to reach.
Configure health probes
Add the following exec probe so Qovery (and Kubernetes) can verify Squid is healthy:| Probe | Command |
|---|---|
| Liveness | squid -k check |
| Readiness | squid -k check |
squid -k check sends a signal to the running Squid process and exits with a non-zero code if the process is not responding — making it a reliable health signal.
Step 2: Configure the application to use the proxy
Add the following environment variables to your application in Qovery:| Variable | Value | Purpose |
|---|---|---|
HTTPS_PROXY | http://$QOVERY_CONTAINER_<ID>_HOST_INTERNAL:3128 | Route HTTPS traffic through proxy |
HTTP_PROXY | http://$QOVERY_CONTAINER_<ID>_HOST_INTERNAL:3128 | Route HTTP traffic through proxy |
NO_PROXY | 127.0.0.1,localhost,.svc,.cluster.local | Bypass proxy for internal traffic |
QOVERY_CONTAINER_<ID>_HOST_INTERNAL. You can find the exact variable name in the Environment Variables tab of your Squid service, under the built-in variables section.
Use it by reference so the value stays correct across redeployments:
Some runtimes and libraries also read lowercase variants:
http_proxy, https_proxy, no_proxy. Set both if your language runtime requires it.Step 3: Validate the setup
Once both services are deployed, exec into your application container and test:Step 4 (optional): Enforce with a NetworkPolicy
A NetworkPolicy prevents your application from bypassing the proxy and talking directly to the internet. Qovery-managed clusters run AWS VPC CNI with network policy support enabled, so this works out of the box.Troubleshooting
Application cannot reach anything
Application cannot reach anything
Check that:
HTTPS_PROXYandHTTP_PROXYare set and point to the correct hostname and portNO_PROXYincludes.svcand.cluster.local- The Squid pod is running and healthy (
squid -k checkprobe passes) - The Squid service name matches the hostname in the env vars
- If NetworkPolicy is applied, DNS (port 53) is explicitly allowed
An allowed domain is still blocked
An allowed domain is still blocked
Check:
- Whether the service uses a different hostname than expected (e.g. a CDN endpoint)
- Whether there are HTTP redirects to a non-allowlisted domain
- The proxy access log — it shows the exact destination the client is requesting
Internal service calls are failing
Internal service calls are failing
Check that
.svc and .cluster.local are in NO_PROXY. Without this, Kubernetes internal service discovery goes through the proxy and typically fails.Some requests succeed but others fail intermittently
Some requests succeed but others fail intermittently
This often happens when an external service uses multiple backend hostnames or load balances across CDN nodes. Check proxy logs for blocked requests and add the missing hostnames to the allowlist.
Squid health probe is failing
Squid health probe is failing
Make sure the container has fully started before the probe runs —
ubuntu/squid may take a few seconds to initialize. Add a initialDelaySeconds to the probe if needed. You can also exec into the container and run squid -k check manually to check the process state.Related documentation
Environment Variables
Configure environment variables and file variables on your services
Container Service
Deploy a container image as a Qovery service
Security Overview
Security and compliance capabilities in Qovery
Advanced Settings
Fine-tune service behavior with advanced settings