HUB
Sign inSign up
cadvisor-ssl logo

udp1024/cadvisor-ssl

By udp1024

•Updated 17 days ago

Google cAdvisor with native SSL/TLS and Mutual TLS (mTLS) support.

Image
Integration & delivery
Monitoring & observability
0

698

udp1024/cadvisor-ssl repository overview

⁠cAdvisor with Native SSL / TLS Support (Multi-Arch)

GitHub Release Architectures License

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⁠


⁠🖥️ Supported Architectures (Multi-Arch)

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:

ArchitecturePlatform TagSupported Processors & Environments
AMD64 / x86_64linux/amd64Intel Xeon / Core, AMD EPYC / Ryzen, Standard Cloud VMs (AWS EC2, Google Compute Engine, Azure VMs, Hetzner, Bare Metal)
ARM64 / AArch64linux/arm64AWS Graviton (c6g, c7g, m6g, t4g), Apple Silicon (M1/M2/M3/M4 via Docker Desktop), Ampere Altra, Raspberry Pi 4 / 5 (64-bit OS)
⁠Inspect Manifest

You can verify the multi-platform manifest directly from your terminal:

docker buildx imagetools inspect udp1024/cadvisor-ssl:latest

⁠💡 Why cAdvisor-SSL?

⁠The Problem with Vanilla cAdvisor

Google's upstream cAdvisor daemon serves metrics (/metrics) and its web interface over unencrypted plaintext HTTP.

In modern production environments:

  • Security & Compliance: Regulations like PCI-DSS, HIPAA, SOC 2, and FedRAMP prohibit transmitting host and infrastructure telemetry in cleartext. Plaintext metrics expose sensitive host details, kernel statistics, container names, and environment parameters across local networks.
  • Zero Trust Networks: Modern Kubernetes clusters and hybrid architectures require all intra-cluster communications to be encrypted in transit.
⁠Why Native SSL vs. Sidecar Proxies?

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:

MetricSidecar Proxy (e.g. Nginx/Envoy)Native cAdvisor-SSL
Containers per Node2 containers (proxy + cAdvisor)1 lightweight container
Memory FootprintAdditional 50MB - 150MB per node0MB extra memory (built into Go binary)
Port & Loopback RoutingComplex localhost forwardingDirect TLS port binding
DaemonSet ComplexityShared network namespaces, extra configsStandard single-container DaemonSet
Failure PointsProxy crashes leave cAdvisor unreachableZero intermediary failure points

⁠🔒 SSL / TLS Command-Line Flags

FlagDefaultDescription
-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_file and -tls_key_file are omitted, cAdvisor starts in standard HTTP mode on port 8080.


⁠🚀 Quick Start Examples

⁠1. Docker Run
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

⁠2. Docker Compose
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

⁠3. Prometheus Scrape Configuration (prometheus.yml)
⁠Standard HTTPS Scraping:
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
⁠Mutual TLS (mTLS) Scraping:
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

⁠🤖 Automated Upstream Release Tracking

This distribution does not require manual maintenance. A daily GitHub Actions workflow:

  1. Detects new official Google cAdvisor release tags via the GitHub API.
  2. Automatically rebases our SSL patch onto Google's new tag.
  3. Builds native multi-arch images (linux/amd64 and linux/arm64) using Docker Buildx and QEMU.
  4. Pushes matching <version>-ssl and latest tags to Docker Hub and GHCR.
  5. In case of upstream merge conflicts, automatically aborts the rebase to guarantee production stability and opens an alert Issue.

⁠License & Credits

Tag summary
Recent tags
Content type
Image
Digest
sha256:71ff6bacb…
Size
29.4 MB
Last updated
17 days ago
docker pull udp1024/cadvisor-ssl:latest