Bootstrap FreeKB - OpenShift - List API Request Counts using the oc get apirequestcounts command
OpenShift - List API Request Counts using the oc get apirequestcounts command

Updated:   |  OpenShift articles

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

The oc get apirequestcounts command can be used to return the list of API's and their current request counts.

~]# oc get apirequestcounts
NAME                                  REMOVEDINRELEASE    REQUESTSINCURRENTHOUR    REQUESTSINLAST24H
cronjobs.v1beta1.batch                1.25                0                        0
events.v1beta1.events.k8s.io          1.25                0                        0
ingresses.v1beta1.extensions          1.25                0                        0
podsecuritypolicies.v1beta1.policy    1.25                16                       459

 

Often, you'll want to review this output before upgrading OpenShift to a new version to determine if any of the APIs have been removed in the version of Kubernetes you are upgrading to. The oc version command can be used to list the version of Kubernetes you are currently at (1.24 in this example). In this example, if you are going to be upgrading OpenShift that includes Kubernetes 1.25 the APIs listed above would be removed since the APIs are being removed in Kubernetes version 1.25. You probably would only be concerned with the APIs that have requests in the last 24 hours.

~]$ oc version
Client Version: 4.12.25
Kustomize Version: v4.5.4
Server Version: 4.12.25
Kubernetes Version: v1.24.6+5658434

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter fa65dc in the box below so that we can be sure you are a human.