Kubectl get nodes returns empty resource


#1

Hi All,

I am kind of stuck with kubectl get nodes returning empty resource.

kubectl version :

kubectl version
Client Version: version.Info{Major:“1”, Minor:“12”, GitVersion:“v1.12.2”, GitCommit:“17c77c7898218073f14c8d573582e8d2313dc740”, GitTreeState:“clean”, BuildDate:“2018-10-30T21:39:38Z”, GoVersion:“go1.11.1”, Compiler:“gc”, Platform:“darwin/amd64”}
Server Version: version.Info{Major:“1”, Minor:“12”, GitVersion:“v1.12.3”, GitCommit:“435f92c719f279a3a67808c80521ea17d5715c66”, GitTreeState:“clean”, BuildDate:“2018-11-26T12:46:57Z”, GoVersion:“go1.10.4”, Compiler:“gc”, Platform:“linux/amd64”}


I enabled debug and saw that it runs the get nodes api. when i run get nodes api , this is what the api server returns.

{
“columnDefinitions” : [
{
“type” : “string”,
“description” : “Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: kubernetes.io/docs/user-guide/identifiers#names”,
“priority” : 0,
“name” : “Name”,
“format” : “name”
},
{
“type” : “string”,
“description” : “The status of the node”,
“priority” : 0,
“name” : “Status”,
“format” : “”
},
{
“priority” : 0,
“name” : “Roles”,
“format” : “”,
“description” : “The roles of the node”,
“type” : “string”
},
{
“priority” : 0,
“format” : “”,
“name” : “Age”,
“description” : “CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata”,
“type” : “string”
},
{
“priority” : 0,
“name” : “Version”,
“format” : “”,
“type” : “string”,
“description” : “Kubelet Version reported by the node.”
},
{
“type” : “string”,
“description” : “List of addresses reachable to the node. Queried from cloud provider, if available. More info: kubernetes.io/docs/concepts/nodes/node/#addresses”,
“format” : “”,
“name” : “Internal-IP”,
“priority” : 1
},
{
“type” : “string”,
“description” : “List of addresses reachable to the node. Queried from cloud provider, if available. More info: kode/#addresses”,
“format” : “”,
“name” : “External-IP”,
“priority” : 1
},
{
“priority” : 1,
“name” : “OS-Image”,
“format” : “”,
“type” : “string”,
“description” : “OS Image reported by the node from /etc/os-release (e.g. Debian GNU/Linux 7 (wheezy)).”
},
{
“priority” : 1,
“format” : “”,
“name” : “Kernel-Version”,
“type” : “string”,
“description” : “Kernel Version reported by the node from ‘uname -r’ (e.g. 3.16.0-0.bpo.4-amd64).”
},
{
“type” : “string”,
“description” : “ContainerRuntime Version reported by the node through runtime remote API (e.g. docker://1.5.0).”,
“priority” : 1,
“format” : “”,
“name” : “Container-Runtime”
}
],
“apiVersion” : “meta.k8s.io/v1beta1”,
“kind” : “Table”,
“rows” : [],
“metadata” : {
“selfLink” : “/api/v1/nodes”,
“resourceVersion” : “1852”
}
}

Any clues on what might be going wrong here ?