Hide Forgot
- What is the nature and description of the request? As a cluster admin I require the ability to list all of the resources that are available. - Why does the customer need this? (List the business requirements here) Because the only way to currently see the full list of resources is to curl each endpoint (oapi/v1 and api/v1) but there is no OC command. - How would the customer like to achieve this? (List the functional requirements here) oc get resources (or equivalent) - For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented. oc get resources (or equivalent) - Is there already an existing RFE upstream or in Red Hat Bugzilla? Not that I could find. - List any affected packages or components. OpenShift API Maybe Kubernetes API
Can you please clarify what you mean by "the resources that are available" here? Is it the available cluster resources, like in quotas (volumes, etc) or API resources? We have 'oc get all' which will list most (although not all) API resources available in a given namespace, and can be used like 'oc get all --all' to fetch it from all namespaces. In case of cluster statistic of resources, there is 'oadm top' which should give you at least part of that. Does any of them help?
Hi Fabiano, My apologizes for the massive delay. The `oc get all` output is along the idea that I am looking for, as I do want to know the API resources. Currently the only way to get all of the api resources is to reach out to the api endpoint itself and get all of the options, and then to handle the output. But we do not have a tool in the cli that is something like `oc get resources`. In theory, an ideal for this would be to have each user only be able to see what endpoints they have permissions on (but that is going above and beyond what I am looking for). Also what version is `oadm top` a part of? I am running 3.2.1 and do not have that command.
Would the functionality that `oc get` and `oc types` have today cover this, or are you also looking to retrieve the actual resource values rather than just information on which types exist?
oc api-resources covers this in 3.11.
oc api-resources implemented since 3.10