kubectl When the node is abnormal, the output format of the Top node is incorrect Go

What happened: image

What you expected to happen: image

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment: - Kubernetes client and server versions (use kubectl version): - Cloud provider or hardware configuration: - OS (e.g: cat /etc/os-release):

Asked Oct 07 '21 12:10
avatar wujiangfa-xlauncher
wujiangfa-xlauncher

4 Answer:

kubectl is using a built in tabwriter to output the value.

I was able to reproduce the error, will take a look

NAME      CPU(cores)   CPU%   MEMORY(bytes)   MEMORY%     
kmaster   790m         19%    1090Mi          28%         
knode0    687m         17%    1039Mi          27%         
foo       <unknown>                           <unknown>               <unknown>               <unknown>    

This PR https://github.com/kubernetes/kubectl/pull/1114 will fix this

/triage accepted

1
Answered Sep 16 '21 at 15:17
avatar  of lauchokyip
lauchokyip

@wujiangfa-xlauncher , I saw the PR you opened https://github.com/kubernetes/kubectl/pull/1114, do you want to open the PR in the main repo https://github.com/kubernetes/kubernetes so we can get that merged?

1
Answered Sep 16 '21 at 15:35
avatar  of lauchokyip
lauchokyip

Closing this because https://github.com/kubernetes/kubernetes/pull/105121 was merged /close

1
Answered Sep 30 '21 at 03:32
avatar  of lauchokyip
lauchokyip

@lauchokyip: Closing this issue.

In response to this:

Closing this because https://github.com/kubernetes/kubernetes/pull/105121 was merged /close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1
Answered Sep 30 '21 at 03:32
avatar  of k8s-ci-robot
k8s-ci-robot