mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * upgrading/rosa-updating-cluster-prepare.adoc
|
|
// * upgrading/osd-updating-cluster-prepare.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="update-preparing-evaluate-apirequestcount-workloads_{context}"]
|
|
= Using APIRequestCount to identify which workloads are using the removed APIs
|
|
|
|
You can examine the `APIRequestCount` resource for a given API version to help identify which workloads are using the API.
|
|
|
|
.Prerequisites
|
|
|
|
* You must have access to the cluster as a user with the `cluster-admin` role.
|
|
|
|
.Procedure
|
|
|
|
* Run the following command and examine the `username` and `userAgent` fields to help identify the workloads that are using the API:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get apirequestcounts <resource>.<version>.<group> -o yaml
|
|
----
|
|
+
|
|
For example:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get apirequestcounts ingresses.v1beta1.networking.k8s.io -o yaml
|
|
----
|
|
+
|
|
You can also use `-o jsonpath` to extract the `username` values from an `APIRequestCount` resource:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ oc get apirequestcounts ingresses.v1beta1.networking.k8s.io -o jsonpath='{range ..username}{$}{"\n"}{end}' | sort | uniq
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
user1
|
|
user2
|
|
app:serviceaccount:delta
|
|
----
|