Bug 1470006

Summary: oc adm top pod/node help says "kubectl" in the examples
Product: OpenShift Container Platform Reporter: Eduardo Minguez <eminguez>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: Xingxing Xia <xxia>
Severity: low Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:40:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eduardo Minguez 2017-07-12 09:12:46 UTC
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:

Comment 1 Juan Vallejo 2017-08-25 21:00:15 UTC
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

Comment 3 Maciej Szulik 2019-02-26 15:50:03 UTC
Fix in https://github.com/openshift/origin/pull/22152.

Comment 4 Xingxing Xia 2019-04-03 03:32:45 UTC
Verified in oc v4.0.22

Comment 6 errata-xmlrpc 2019-06-04 10:40:18 UTC
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