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)
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.
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.
I’m using ubuntu 18.04, have the same issue
I downgraded
kubectl
tov1.10.0
anddump
works.Same issue on Google Cloud GKE with version 1.10.5:
verified that 1.10.5 dump works on mac os:
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/d09d97241b17a5e02a25fc51fc56e2a5de74501c/Formula/kubernetes-cli.rb