Hide Forgot
Description of problem: oc adm top pod/node -h output contains wrong information in the examples Version-Release number of selected component (if applicable): oc v3.5.5.31 kubernetes v1.5.2+43a9be4 features: Basic-Auth GSSAPI Kerberos SPNEGO Server https://emingueztst.eastus2.cloudapp.azure.com:8443 openshift v3.5.5.31 kubernetes v1.5.2+43a9be4 How reproducible: oc adm top node -h oc adm top pod -h Steps to Reproduce: 1. install metrics in an ocp cluster 2. run those comands Actual results: [edu@bastion ~]$ oc adm top node -h Display Resource (CPU/Memory/Storage) usage of nodes. The top-node command allows you to see the resource consumption of nodes. Aliases: node, nodes Usage: oc adm top node [NAME | -l label] [options] Examples: # Show metrics for all nodes kubectl top node # Show metrics for a given node kubectl top node NODE_NAME Options: --heapster-namespace='kube-system': Namespace Heapster service is located in --heapster-port='': Port name in service to use --heapster-scheme='http': Scheme (http or https) to connect to Heapster as --heapster-service='heapster': Name of Heapster service -l, --selector='': Selector (label query) to filter on Use "oc adm options" for a list of global command-line options (applies to all commands). [edu@bastion ~]$ oc adm top pod -h Display Resource (CPU/Memory/Storage) usage of pods. The 'top pod' command allows you to see the resource consumption of pods. Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation. Aliases: pod, pods Usage: oc adm top pod [NAME | -l label] [options] Examples: # Show metrics for all pods in the default namespace kubectl top pod # Show metrics for all pods in the given namespace kubectl top pod --namespace=NAMESPACE # Show metrics for a given pod and its containers kubectl top pod POD_NAME --containers # Show metrics for the pods defined by label name=myLabel kubectl top pod -l name=myLabel Options: --all-namespaces=false: If present, list the requested object(s) across all namespaces. Namespace in current context is ignored even if specified with --namespace. --containers=false: If present, print usage of containers within a pod. --heapster-namespace='kube-system': Namespace Heapster service is located in --heapster-port='': Port name in service to use --heapster-scheme='http': Scheme (http or https) to connect to Heapster as --heapster-service='heapster': Name of Heapster service -l, --selector='': Selector (label query) to filter on Use "oc adm options" for a list of global command-line options (applies to all commands). Expected results: No references to kubectl but oc Additional info:
Proposed solution that aims to address this in all commands: https://docs.google.com/a/redhat.com/document/d/19mDdhJYGPiBKGpTkR9SiRWa_ZOg_FHnp0DENJYKmYbk/edit?usp=sharing
Fix in https://github.com/openshift/origin/pull/22152.
Verified in oc v4.0.22
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758