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

Not able to add node - Kubeadm #223

Closed
githubvick opened this issue Apr 4, 2017 · 6 comments
Closed

Not able to add node - Kubeadm #223

githubvick opened this issue Apr 4, 2017 · 6 comments

Comments

@githubvick
Copy link

githubvick commented Apr 4, 2017

What keywords did you search in kubeadm issues before filing this one?

Failed to request cluster info, will try again: [the server has asked for the client to provide credentials (get configmaps cluster-info)]

If you have found any duplicates, you should instead reply there and close this page.

If you have not found any duplicates, delete this section and continue on.

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version):

kubeadm version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0", GitCommit:"fff5156092b56e6bd60fff75aad4dc9de6b6ef37", GitTreeState:"clean", BuildDate:"2017-03-28T16:24:30Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):kubectl version

Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.0", GitCommit:"fff5156092b56e6bd60fff75aad4dc9de6b6ef37", GitTreeState:"clean", BuildDate:"2017-03-28T16:36:33Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}

  • Cloud provider or hardware configuration:Virtual machine VMWare
  • OS (e.g. from /etc/os-release):CentOS Linux release 7.3.1611 (Core)
  • Kernel (e.g. uname -a):Linux kubenode1 3.10.0-514.10.2.el7.x86_64 kubeadm join on slave node fails preflight checks #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Others:

What happened?

When kubeadm configured and node is added with the join command as mentioned in this site

https://kubernetes.io/docs/getting-started-guides/kubeadm/

kubeadm join --token=a66fb4.53099c80dc10cd7b x.x.x.x:6443

Getting this error

[discovery] Failed to request cluster info, will try again: [the server has asked for the client to provide credentials (get configmaps cluster-info)]

What you expected to happen?

Nodes should be added without any errors

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

Install and configure Kubeadm using kubeadm init
Add node using kubeadm join command

Anything else we need to know?

In journalctl

kubelet[30298]: error: failed to run Kubelet: invalid kubeconfig: stat /etc/kubernetes/kubelet.conf: no such file or directory

@luxas
Copy link
Member

luxas commented Apr 5, 2017

Hmm, I think you're trying to do kubeadm join with kubeadm v1.6 against a kubeadm v1.5 master.
That's not supported currently.

Is that the case?
Please use v1.6 for both master and node

@githubvick
Copy link
Author

Hi Lucas,

I followed the same instructions on master and nodes. yum install -y docker kubelet kubeadm kubectl kubernetes-cni. Both have version 1.6

@luxas
Copy link
Member

luxas commented Apr 5, 2017

@githubvick are you sure your master is up and running correctly?
What does kubectl -n kube-public get cm on the master show?

@githubvick
Copy link
Author

githubvick commented Apr 5, 2017

Hi Luxas,

The issue was because these steps weren't performed , these were displayed today after the fresh install and not a couple of days back when I had tried.

sudo cp /etc/kubernetes/admin.conf $HOME/
sudo chown $(id -u):$(id -g) $HOME/admin.conf
export KUBECONFIG=$HOME/admin.conf

Thanks a lot for looking into the issue.

@Anmorata
Copy link

Anmorata commented Jul 24, 2017

I'm having the same problem. when master is in alone everything works fine, but as soon as I join node the pods go in loop

Jul 24 11:45:25 ubuntu kubelet[8442]: W0724 11:45:25.538357    8442 kubelet.go:1596] Deleting mirror pod "kube-apiserver-ubuntu_kube-system(41179207-70a0-11e7-a283-000c29fa48d9)" because it is outdated
Jul 24 11:45:25 ubuntu kubelet[8442]: E0724 11:45:25.931877    8442 mirror_client.go:88] Failed deleting a mirror pod "kube-apiserver-ubuntu_kube-system": pods "Unknown" is forbidden: pods "kube-apiserver-ubuntu" not found
Jul 24 11:45:26 ubuntu kubelet[8442]: W0724 11:45:26.887134    8442 kubelet.go:1596] Deleting mirror pod "etcd-ubuntu_kube-system(4154979a-70a0-11e7-a283-000c29fa48d9)" because it is outdated
Jul 24 11:45:26 ubuntu kubelet[8442]: W0724 11:45:26.924202    8442 status_manager.go:448] Failed to update status for pod "etcd-ubuntu_kube-system(4154979a-70a0-11e7-a283-000c29fa48d9)": Operation cannot be fulfilled on pods "etcd-ubuntu": StorageError: invalid object, Code: 4, Key: /registry/pods/kube-system/etcd-ubuntu, ResourceVersion: 0, AdditionalErrorMsg: Precondition failed: UID in precondition: 4154979a-70a0-11e7-a283-000c29fa48d9, UID in object meta:
Jul 24 11:45:26 ubuntu kubelet[8442]: W0724 11:45:26.942933    8442 kubelet.go:1596] Deleting mirror pod "kube-scheduler-ubuntu_kube-system(413661bf-70a0-11e7-a283-000c29fa48d9)" because it is outdated
Jul 24 11:45:27 ubuntu kubelet[8442]: E0724 11:45:27.127853    8442 mirror_client.go:88] Failed deleting a mirror pod "etcd-ubuntu_kube-system": pods "Unknown" is forbidden: pods "etcd-ubuntu" not found
Jul 24 11:45:27 ubuntu kubelet[8442]: E0724 11:45:27.537269    8442 mirror_client.go:88] Failed deleting a mirror pod "kube-scheduler-ubuntu_kube-system": pods "Unknown" is forbidden: pods "kube-scheduler-ubuntu" not found
Jul 24 11:45:27 ubuntu kubelet[8442]: W0724 11:45:27.558416    8442 kubelet.go:1596] Deleting mirror pod "kube-controller-manager-ubuntu_kube-system(41732acc-70a0-11e7-a283-000c29fa48d9)" because it is outdated

here is the log from master. copying admin.conf didn't helped

update:

when I start kubelet service on node I have this error:

- The start-up result is done.
Jul 24 11:50:18 ubuntu kubelet[2708]: I0724 11:50:18.842908    2708 feature_gate.go:144] feature gates: map[]
Jul 24 11:50:18 ubuntu kubelet[2708]: error: failed to run Kubelet: invalid kubeconfig: stat /etc/kubernetes/kubelet.conf: no such file or directory
Jul 24 11:50:18 ubuntu systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Jul 24 11:50:18 ubuntu systemd[1]: kubelet.service: Unit entered failed state.
Jul 24 11:50:18 ubuntu systemd[1]: kubelet.service: Failed with result 'exit-code'.
Jul 24 11:50:28 ubuntu systemd[1]: kubelet.service: Service hold-off time over, scheduling restart.
Jul 24 11:50:28 ubuntu systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
-- Subject: Unit kubelet.service has finished shutting down

@luxas
Copy link
Member

luxas commented Jul 24, 2017

@Anmorata please open a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants