You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,18 @@
1
+
## v2.16.0 / 2025-06-23
2
+
3
+
## Note
4
+
5
+
* This release builds with Golang `v1.24.4`
6
+
* This release builds with `k8s.io/client-go`: `v0.32.6`
7
+
8
+
*[FEATURE] Add a `reclaim_policy` label to the `kube_persistentvolume_info` metric by @SuperQ in <https://github.com/kubernetes/kube-state-metrics/pull/2615>
9
+
*[FEATURE] Use dlclark/regexp2 over standard library's package to support lookarounds by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2616>
10
+
*[BUGFIX] Report correct values in `kube_pod_status_reason` metric by @carlosmorenokm1 in <https://github.com/kubernetes/kube-state-metrics/pull/2644>
11
+
*[FEATURE] Add add `pathType` to `kube_ingress_path` by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2670>
12
+
*[FEATURE] Introduce object limits by @mrueg in <https://github.com/kubernetes/kube-state-metrics/pull/2626>
13
+
*[BUGFIX] Close reflectors once their corresponding CRDs are dropped by @rexagod in <https://github.com/kubernetes/kube-state-metrics/pull/2672>
14
+
*[FEATURE] Incorporate `WithAuthenticationAndAuthorization` to support endpoint authn/z by @mrueg in <https://github.com/kubernetes/kube-state-metrics/pull/2686>
Copy file name to clipboardExpand all lines: MAINTAINER.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
kube-state-metrics is welcoming contributions from the community. If you are interested in intensifying your contributions and becoming a maintainer, this doc describes the necessary steps.
4
4
5
-
As part of the Kubernetes project, we use the community membership process as described [here](https://github.com/kubernetes/community/blob/master/community-membership.md). We do not adhere strictly to the numbers of contributions and reviews. Still as becoming a maintainer is a trust-based process and we desire positive outcomes for the project, we look for a long-term interest and engagement.
5
+
As part of the Kubernetes project, we rely on the [community membership process](https://github.com/kubernetes/community/blob/master/community-membership.md). We do not adhere strictly to the numbers of contributions and reviews. Still as becoming a maintainer is a trust-based process and we desire positive outcomes for the project, we look for a long-term interest and engagement.
Copy file name to clipboardExpand all lines: docs/README.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,3 +97,49 @@ See [Custom Resource State Metrics](metrics/extend/customresourcestate-metrics.m
97
97
## CLI Arguments
98
98
99
99
Additionally, options for `kube-state-metrics` can be passed when executing as a CLI, or in a kubernetes / openshift environment. More information can be found here: [CLI Arguments](developer/cli-arguments.md)
100
+
101
+
## Protecting /metrics endpoints
102
+
103
+
Kube-State-Metrics' metrics can contain sensitive information about the state of the cluster, which you as an operator might want to additionally protect from unauthorized access.
104
+
In order to achieve this, you need to enable the `--auth-filter` flag on kube-state-metrics.
105
+
With this, kube-state-metrics will only accept authenticated and authorized requests to the /metrics endpoints.
106
+
Kube-state-metrics uses Kubernetes' RBAC mechanisms for this, so this means that every scrape will trigger a request against the API Server for TokenReview and SubjectAccessReview.
107
+
The clients scraping the endpoint, need to use a token which can be provided by a ServiceAccount that can be set up the following way:
108
+
109
+
A ClusterRole providing access like this:
110
+
111
+
```
112
+
apiVersion: rbac.authorization.k8s.io/v1
113
+
kind: ClusterRole
114
+
metadata:
115
+
name: metrics-reader
116
+
rules:
117
+
- nonResourceURLs:
118
+
- "/metrics"
119
+
verbs:
120
+
- get
121
+
```
122
+
123
+
and a matching ClusterRoleBinding
124
+
125
+
```
126
+
apiVersion: rbac.authorization.k8s.io/v1
127
+
kind: ClusterRoleBinding
128
+
metadata:
129
+
name: metrics-reader-rolebinding
130
+
roleRef:
131
+
apiGroup: rbac.authorization.k8s.io
132
+
kind: ClusterRole
133
+
name: metrics-reader
134
+
subjects:
135
+
- kind: ServiceAccount
136
+
name: YOUR_SERVICE_ACCOUNT
137
+
namespace: NAMESPACE_OF_THE_SERVICE_ACCOUNT
138
+
```
139
+
140
+
Your client can then use either this ServiceAccount to gather metrics or you can create a token, that can be used to fetch data like this:
0 commit comments