Skip to content

Commit 6610821

Browse files
authored
Merge pull request #23551 from tao12345666333/fix-metrics-label
fix `apiserver_requested_deprecated_apis` memtric's label.
2 parents 0dac982 + 72376c5 commit 6610821

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/en/docs/reference/using-api/deprecation-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ Starting in Kubernetes v1.19, making an API request to a deprecated REST API end
303303
2. Adds a `"k8s.io/deprecated":"true"` annotation to the [audit event](/docs/tasks/debug-application-cluster/audit/) recorded for the request.
304304
3. Sets an `apiserver_requested_deprecated_apis` gauge metric to `1` in the `kube-apiserver`
305305
process. The metric has labels for `group`, `version`, `resource`, `subresource` that can be joined
306-
to the `apiserver_request_total` metric, and a `removed_version` label that indicates the
306+
to the `apiserver_request_total` metric, and a `removed_release` label that indicates the
307307
Kubernetes release in which the API will no longer be served. The following Prometheus query
308308
returns information about requests made to deprecated APIs which will be removed in v1.22:
309-
309+
310310
```promql
311-
apiserver_requested_deprecated_apis{removed_version="1.22"} * on(group,version,resource,subresource) group_right() apiserver_request_total
311+
apiserver_requested_deprecated_apis{removed_release="1.22"} * on(group,version,resource,subresource) group_right() apiserver_request_total
312312
```
313313

314314
### Fields of REST resources

0 commit comments

Comments
 (0)