Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`kubectl get componentstatus` fails to write as table #83024

Open
JTarasovic opened this issue Sep 23, 2019 · 11 comments

Comments

@JTarasovic
Copy link

@JTarasovic JTarasovic commented Sep 23, 2019

What happened:

kubectl get componentstatus
NAME                 AGE
scheduler            <unknown>
controller-manager   <unknown>
etcd-0               <unknown>

What you expected to happen:
get componentstatus should be able to have its results formated as a table by kubectl

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

Anything else we need to know?:
-o yaml or json work as expected

I0923 09:34:36.921495   60677 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table
I0923 09:34:36.921566   60677 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table
I0923 09:34:36.921585   60677 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table

Environment:

  • Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-19T13:57:45Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:50Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

also ran against 1.16.0 servers with same result

  • Cloud provider or hardware configuration:
    AWS
  • OS (e.g: cat /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
    Self-hosted
  • Network plugin and version (if this is a network-related bug):
  • Others:
@JTarasovic

This comment has been minimized.

Copy link
Author

@JTarasovic JTarasovic commented Sep 23, 2019

/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli and removed needs-sig labels Sep 23, 2019
@liggitt

This comment has been minimized.

Copy link
Member

@liggitt liggitt commented Sep 23, 2019

This actually means the apiserver is not returning table results.

/remove-sig cli

not sure which sig owns this API, so taking a guess
/sig api-machinery cluster-lifecycle

@roycaihw

This comment has been minimized.

Copy link
Member

@roycaihw roycaihw commented Sep 23, 2019

@smarterclayton

This comment has been minimized.

Copy link
Contributor

@smarterclayton smarterclayton commented Sep 25, 2019

Isn't component status deprecated?

@liggitt

This comment has been minimized.

Copy link
Member

@liggitt liggitt commented Sep 25, 2019

Isn't component status deprecated?

Not officially. It got stuck in the "the replacement must be available before it can be deprecated" trap, despite being fundamentally flawed and inapplicable to many topologies.

@liggitt

This comment has been minimized.

Copy link
Member

@liggitt liggitt commented Sep 25, 2019

I reopened the issue to push forward deprecation in kubernetes/enhancements#553 (comment)

@notpad

This comment has been minimized.

Copy link
Contributor

@notpad notpad commented Sep 26, 2019

Hi @liggitt , then shall we need to fix this issue. If yes, could you help to approve the test for my pull request #83066 . Thanks.

@icobra

This comment has been minimized.

Copy link

@icobra icobra commented Oct 28, 2019

kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}

VDS: Intel Xeon - 2.6Ghz, RAM 2 Gb, HDD — 30 Gb

cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"

uname -a
Linux 5.3.7-1.el7.elrepo.x86_64 #1 SMP Thu Oct 17 18:17:07 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

Flanel

@kgrvamsi

This comment has been minimized.

Copy link

@kgrvamsi kgrvamsi commented Nov 4, 2019

I get the same issue with the v1.16.2 release

root@instance:/opt/configs# kubectl get cs -v=8 --kubeconfig=admin.kubeconfig
I1104 06:33:10.467900   24052 loader.go:375] Config loaded from file:  admin.kubeconfig
I1104 06:33:10.474798   24052 round_trippers.go:420] GET https://172.28.128.37:6443/api/v1/componentstatuses?limit=500
I1104 06:33:10.475082   24052 round_trippers.go:427] Request Headers:
I1104 06:33:10.475303   24052 round_trippers.go:431]     Accept: application/json;as=Table;v=v1beta1;g=meta.k8s.io, application/json
I1104 06:33:10.475585   24052 round_trippers.go:431]     User-Agent: kubectl/v1.16.2 (linux/amd64) kubernetes/c97fe50
I1104 06:33:10.493607   24052 round_trippers.go:446] Response Status: 200 OK in 17 milliseconds
I1104 06:33:10.493623   24052 round_trippers.go:449] Response Headers:
I1104 06:33:10.493627   24052 round_trippers.go:452]     Cache-Control: no-cache, private
I1104 06:33:10.493630   24052 round_trippers.go:452]     Content-Type: application/json
I1104 06:33:10.493633   24052 round_trippers.go:452]     Content-Length: 661
I1104 06:33:10.493636   24052 round_trippers.go:452]     Date: Mon, 04 Nov 2019 06:33:10 GMT
I1104 06:33:10.494115   24052 request.go:968] Response Body: {"kind":"ComponentStatusList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/componentstatuses"},"items":[{"metadata":{"name":"etcd-0","selfLink":"/api/v1/componentstatuses/etcd-0","creationTimestamp":null},"conditions":[{"type":"Healthy","status":"True","message":"{\"health\":\"true\"}"}]},{"metadata":{"name":"controller-manager","selfLink":"/api/v1/componentstatuses/controller-manager","creationTimestamp":null},"conditions":[{"type":"Healthy","status":"True","message":"ok"}]},{"metadata":{"name":"scheduler","selfLink":"/api/v1/componentstatuses/scheduler","creationTimestamp":null},"conditions":[{"type":"Healthy","status":"True","message":"ok"}]}]}
I1104 06:33:10.494660   24052 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table
I1104 06:33:10.494685   24052 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table
I1104 06:33:10.494694   24052 table_printer.go:44] Unable to decode server response into a Table. Falling back to hardcoded types: attempt to decode non-Table object into a v1beta1.Table
NAME                 AGE
etcd-0               <unknown>
controller-manager   <unknown>
scheduler            <unknown>
root@instance:/opt/configs# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
@nocanstillbb

This comment has been minimized.

Copy link

@nocanstillbb nocanstillbb commented Nov 7, 2019

[root@m1 ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
[root@m1 ~]# kubectl get cs
NAME                 AGE
scheduler            <unknown>
controller-manager   <unknown>
etcd-0               <unknown>
[root@m1 ~]# kubectl get cs -o yaml
apiVersion: v1
items:
- apiVersion: v1
  conditions:
  - message: ok
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: scheduler
    selfLink: /api/v1/componentstatuses/scheduler
- apiVersion: v1
  conditions:
  - message: ok
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: controller-manager
    selfLink: /api/v1/componentstatuses/controller-manager
- apiVersion: v1
  conditions:
  - message: '{"health":"true"}'
    status: "True"
    type: Healthy
  kind: ComponentStatus
  metadata:
    creationTimestamp: null
    name: etcd-0
    selfLink: /api/v1/componentstatuses/etcd-0
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
[root@m1 ~]#
@rene-demonsters

This comment has been minimized.

Copy link

@rene-demonsters rene-demonsters commented Nov 14, 2019

Duplicate of kubernetes/kubectl#762, not sure which one should be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.