Skip to content

Commit eafc448

Browse files
committed
DOC/MINOR: metrics: add HTTPS warning notes to metrics documentation
Add important notes to metrics.md, metrics-basic.md, and metrics-kube-rbac.md to clarify that switching from the default "none" mode to "basic" or "kube-rbac" changes the metrics endpoint protocol from HTTP to HTTPS. This helps users avoid connection errors by reminding them to explicitly update their curl commands and Prometheus scrape configurations to use the https:// scheme.
1 parent 41e123e commit eafc448

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

documentation/metrics-basic.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Credentials are provided via CLI flags or environment variables.
55

66
The endpoint is served over HTTPS with an auto-generated self-signed certificate.
77

8+
> **Important:** This mode serves metrics over **HTTPS** (not HTTP). If you are switching from the
9+
> default `none` mode, you must use `https://` in your curl commands and Prometheus scrape configs.
10+
> Using `http://` will result in: *"Client sent an HTTP request to an HTTPS server."*
11+
812
## When to Use
913

1014
- External Prometheus instances scraping from outside the cluster

documentation/metrics-kube-rbac.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ only ServiceAccounts with the correct RBAC permissions can access `/metrics`.
66

77
The endpoint is served over HTTPS with an auto-generated self-signed certificate.
88

9+
> **Important:** This mode serves metrics over **HTTPS** (not HTTP). If you are switching from the
10+
> default `none` mode, you must use `https://` in your curl commands and Prometheus scrape configs.
11+
> Using `http://` will result in: *"Client sent an HTTP request to an HTTPS server."*
12+
913
## When to Use
1014

1115
- Production environments

documentation/metrics.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ All flags can also be set via environment variables (e.g., `METRICS_AUTH=basic`)
3030

3131
Both `kube-rbac` and `basic` modes automatically enable HTTPS with a self-signed certificate.
3232

33+
> **Note:** Switching from `none` to `basic` or `kube-rbac` changes the protocol from HTTP to HTTPS.
34+
> You must update your curl commands (use `https://` and `-k` for self-signed certs) and Prometheus
35+
> scrape configs (set `scheme: https` with `insecure_skip_verify: true`) accordingly.
36+
3337
For detailed setup instructions, see:
3438
- [metrics-none.md](metrics-none.md) - No authentication (default)
3539
- [metrics-kube-rbac.md](metrics-kube-rbac.md) - Kubernetes RBAC authentication

0 commit comments

Comments
 (0)