kubernetes: kubectl cluster-info dump doesn't appear to work after kubeadm install

/kind bug

What happened: Installed k8s using kubeadm, and added the admin config as described. When asking for a kubectl cluster-info dump I get

error: missing apiVersion or kind and cannot assign it; no kind is registered for the type core.NodeList

What you expected to happen:

To get a cluster info dump

How to reproduce it (as minimally and precisely as possible): With the following kubeadm.conf

apiVersion: kubeadm.k8s.io/v1alpha1
kind: MasterConfiguration
api:
  advertiseAddress: 0.0.0.0
networking:
  serviceSubnet: fd00:1234::/64
kubernetesVersion: 1.11.0-beta.2
cloudProvider: external
featureGates:
  CoreDNS: false

criSocket: /var/run/containerd/containerd.sock

run

$ sudo kubeadm init --config=kubeadm.conf
$ mkdir -p $HOME/.kube
$ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo chown $(id -u):$(id -g) $HOME/.kube/config
$ kubectl cluster-info
$ kubectl cluster-info dump

Anything else we need to know?: Running containerd

Environment:

  • Kubernetes version (use kubectl version): Client Version: version.Info{Major:“1”, Minor:“11+”, GitVersion:“v1.11.0-beta.2”, GitCommit:“be2cfcf9e44b5162a294e977329d6c8194748c4e”, GitTreeState:“clean”, BuildDate:“2018-06-07T16:21:58Z”, GoVersion:“go1.10.2”, Compiler:“gc”, Platform:“linux/amd64”} Server Version: version.Info{Major:“1”, Minor:“11+”, GitVersion:“v1.11.0-beta.2”, GitCommit:“be2cfcf9e44b5162a294e977329d6c8194748c4e”, GitTreeState:“clean”, BuildDate:“2018-06-07T16:13:01Z”, GoVersion:“go1.10.2”, Compiler:“gc”, Platform:“linux/amd64”}

  • Cloud provider or hardware configuration: Brightbox

  • OS (e.g. from /etc/os-release): Ubuntu 18.04 LTS

  • Kernel (e.g. uname -a): Linux srv-i4r66 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

  • Install tools: kubeadm version: &version.Info{Major:“1”, Minor:“11+”, GitVersion:“v1.11.0-beta.2”, GitCommit:“be2cfcf9e44b5162a294e977329d6c8194748c4e”, GitTreeState:“clean”, BuildDate:“2018-06-07T16:19:15Z”, GoVersion:“go1.10.2”, Compiler:“gc”, Platform:“linux/amd64”}

  • Others: containerd github.com/containerd/containerd v1.1.1-rc.1 cbef57047e900aeb2bafe7a634919bec13f4a2a5

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 27
  • Comments: 30 (4 by maintainers)

Commits related to this issue

Most upvoted comments

I face the same problem after creating a cluster on Azure using AKS.

Problem still there (centOS7) $ kubectl version --short Client Version: v1.11.2 Server Version: v1.11.2

I see the same behaviour after creating a cluster with kops on AWS.

Just FYI.

After upgrading to v1.12.0 the issue is fixed. The actual commit was a part of the v1.12.0 release so you don’t have to cherrypick 😉

fwiw, here is the apt-get command to install an older kubectl over the top of the existing, assuming you have the kubernetes apt source.

apt-get install kubectl=1.10.5-00

command to refresh snap of kubectl to 1.10.5 where kubectl cluster-info dump works for me : sudo snap refresh kubectl --channel 1.10/stable

Seeing this too on EKS. Downgrading kubectl to v1.10.3 seems to work around this issue.

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-28T20:13:43Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
$ kubectl cluster-info dump
error: missing apiVersion or kind and cannot assign it; no kind is registered for the type core.NodeList
$ ./kubectl-v1.10.3 version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-28T20:13:43Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
$ ./kubectl-v1.10.3 cluster-info dump
{
    "selfLink": "/api/v1/nodes",
    "resourceVersion": "1441",
    "Items": []
}
[TRUNCATED OUTPUT]
$ kubectl version --short
Client Version: v1.11.1
Server Version: v1.10.0

I’m using ubuntu 18.04, have the same issue

$ kubectl version --short
Client Version: v1.11.1
Server Version: v1.10.0

I downgraded kubectl to v1.10.0 and dump works.

Same issue on Google Cloud GKE with version 1.10.5:

$ kubectl version
Client Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.0", GitCommit:"91e7b4fd31fcd3d5f436da26c980becec37ceefe", GitTreeState:"clean", BuildDate:"2018-06-27T22:29:25Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10+", GitVersion:"v1.10.5-gke.0", GitCommit:"f4c74e18e57148052c59cc0467bb7e99dcc46399", GitTreeState:"clean", BuildDate:"2018-06-21T14:11:26Z", GoVersion:"go1.9.3b4", Compiler:"gc", Platform:"linux/amd64"}

$ kubectl cluster-info dump
error: missing apiVersion or kind and cannot assign it; no kind is registered for the type core.NodeList

verified that 1.10.5 dump works on mac os: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/d09d97241b17a5e02a25fc51fc56e2a5de74501c/Formula/kubernetes-cli.rb