Google cAdvisor with native SSL/TLS and Mutual TLS (mTLS) support.
698
An enterprise-ready, enhanced distribution of Google's cAdvisor with native SSL/TLS and Mutual TLS (mTLS) support, automated upstream release tracking, smart container healthchecks, and native multi-architecture builds for both x86_64 (amd64) and ARM64.
GitHub Source: https://github.com/udp1024/cAdvisor-SSL
Every image tag is built and pushed as an OCI multi-platform manifest list. When you execute docker pull or docker run, Docker automatically selects and runs the binary tailored for your host CPU architecture:
| Architecture | Platform Tag | Supported Processors & Environments |
|---|---|---|
| AMD64 / x86_64 | linux/amd64 | Intel Xeon / Core, AMD EPYC / Ryzen, Standard Cloud VMs (AWS EC2, Google Compute Engine, Azure VMs, Hetzner, Bare Metal) |
| ARM64 / AArch64 | linux/arm64 | AWS Graviton (c6g, c7g, m6g, t4g), Apple Silicon (M1/M2/M3/M4 via Docker Desktop), Ampere Altra, Raspberry Pi 4 / 5 (64-bit OS) |
You can verify the multi-platform manifest directly from your terminal:
docker buildx imagetools inspect udp1024/cadvisor-ssl:latest
Google's upstream cAdvisor daemon serves metrics (/metrics) and its web interface over unencrypted plaintext HTTP.
In modern production environments:
Traditionally, teams deploy a reverse proxy (such as Nginx, Envoy, or Ghostunnel) as a sidecar in front of cAdvisor. While functional, sidecars introduce major disadvantages:
| Metric | Sidecar Proxy (e.g. Nginx/Envoy) | Native cAdvisor-SSL |
|---|---|---|
| Containers per Node | 2 containers (proxy + cAdvisor) | 1 lightweight container |
| Memory Footprint | Additional 50MB - 150MB per node | 0MB extra memory (built into Go binary) |
| Port & Loopback Routing | Complex localhost forwarding | Direct TLS port binding |
| DaemonSet Complexity | Shared network namespaces, extra configs | Standard single-container DaemonSet |
| Failure Points | Proxy crashes leave cAdvisor unreachable | Zero intermediary failure points |
| Flag | Default | Description |
|---|---|---|
-tls_cert_file | "" | Path to server SSL/TLS certificate (PEM format). Required for HTTPS. |
-tls_key_file | "" | Path to server SSL/TLS private key (PEM format). Required for HTTPS. |
-tls_client_ca_file | "" | (Optional) Path to CA certificate pool for Mutual TLS (mTLS) verification. |
-tls_min_version | "1.2" | (Optional) Minimum acceptable TLS version: "1.2" or "1.3". |
Note: If
-tls_cert_fileand-tls_key_fileare omitted, cAdvisor starts in standard HTTP mode on port8080.
docker run -d \
--name=cadvisor-ssl \
--restart=always \
--privileged \
--device=/dev/kmsg \
-p 8443:8443 \
-v /:/rootfs:ro \
-v /var/run:/var/run:ro \
-v /sys:/sys:ro \
-v /var/lib/docker/:/var/lib/docker:ro \
-v /dev/disk/:/dev/disk:ro \
-v /etc/cadvisor-certs:/etc/cadvisor-certs:ro \
udp1024/cadvisor-ssl:latest \
-port=8443 \
-tls_cert_file=/etc/cadvisor-certs/cadvisor.crt \
-tls_key_file=/etc/cadvisor-certs/cadvisor.key
Verify your HTTPS endpoint:
# Test healthz
curl -k https://localhost:8443/healthz
# Test Prometheus metrics
curl -k https://localhost:8443/metrics
version: '3.8'
services:
cadvisor:
image: udp1024/cadvisor-ssl:latest
container_name: cadvisor-ssl
restart: unless-stopped
privileged: true
devices:
- /dev/kmsg
ports:
- "8443:8443"
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
- ./certs:/etc/cadvisor-certs:ro
command:
- -port=8443
- -tls_cert_file=/etc/cadvisor-certs/cadvisor.crt
- -tls_key_file=/etc/cadvisor-certs/cadvisor.key
- -tls_min_version=1.3
prometheus.yml)scrape_configs:
- job_name: 'cadvisor-ssl'
scheme: https
static_configs:
- targets: ['node1.example.com:8443', 'node2.example.com:8443']
tls_config:
ca_file: /etc/prometheus/ca.crt
# If using self-signed certs without private CA:
# insecure_skip_verify: true
scrape_configs:
- job_name: 'cadvisor-mtls'
scheme: https
static_configs:
- targets: ['node1.example.com:8443']
tls_config:
ca_file: /etc/prometheus/ca.crt
cert_file: /etc/prometheus/client.crt
key_file: /etc/prometheus/client.key
This distribution does not require manual maintenance. A daily GitHub Actions workflow:
linux/amd64 and linux/arm64) using Docker Buildx and QEMU.<version>-ssl and latest tags to Docker Hub and GHCR.docker pull udp1024/cadvisor-ssl:latest