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

Closed
JTarasovic opened this issue Sep 23, 2019 · 12 comments
Closed

kubectl get componentstatus fails to write as table #83024

JTarasovic opened this issue Sep 23, 2019 · 12 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.

Comments

@JTarasovic
Copy link

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 JTarasovic added the kind/bug Categorizes issue or PR as related to a bug. label Sep 23, 2019
@k8s-ci-robot k8s-ci-robot added the needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. label Sep 23, 2019
@JTarasovic
Copy link
Author

/sig cli

@k8s-ci-robot k8s-ci-robot added sig/cli Categorizes an issue or PR as relevant to SIG CLI. and removed needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Sep 23, 2019
@liggitt
Copy link
Member

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

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. and removed sig/cli Categorizes an issue or PR as relevant to SIG CLI. labels Sep 23, 2019
@roycaihw
Copy link
Member

cc @smarterclayton

@smarterclayton
Copy link
Contributor

Isn't component status deprecated?

@liggitt
Copy link
Member

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
Copy link
Member

liggitt commented Sep 25, 2019

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

@notpad
Copy link
Contributor

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
Copy link

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
Copy link

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
Copy link

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
Copy link

rene-demonsters commented Nov 14, 2019

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

@liggitt
Copy link
Member

liggitt commented Nov 28, 2019

Resolved in 1.17.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants