kubeadm: kubelet won't restart after reboot - Unable to register node with API server: connection refused

Is this a request for help?

Yes , I am opening a new issue since the https://github.com/kubernetes/kubeadm/issues/1026 issue was closed , but it still seems to affect a lot more people

If yes, you should use our troubleshooting guide and community support channels, see http://kubernetes.io/docs/troubleshooting/.

If no, delete this section and continue on.

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

Error messages in journalctl

If you have found any duplicates, you should instead reply there and close this page. The other duplicate is closed.

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

kubeadm version (use kubeadm version): kubeadm version: &version.Info{Major:“1”, Minor:“11”, GitVersion:“v1.11.2”, GitCommit:“bb9ffb1654d4a729bb4cec18ff088eacc153c239”, GitTreeState:“clean”, BuildDate:“2018-08-07T23:14:39Z”, GoVersion:“go1.10.3”, Compiler:“gc”, Platform:“linux/amd64”}

Environment:

  • Kubernetes version (use kubectl version): 1.11.2 , cant access Kubectl
  • Cloud provider or hardware configuration: Virtual Box installed on Windows Server 2012
  • OS (e.g. from /etc/os-release): Centos &
  • Kernel (e.g. uname -a): Linux localhost.localdomain 3.10.0-862.el7.x86_64 #1 SMP Fri Apr 20 16:44:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Others:

What happened?

Issue is exactly same as - https://github.com/kubernetes/kubeadm/issues/1026 , I have followed all the steps mentioned including kubeadm reset and kubeadm init , but issue still persists. The issue occured post reboot.

What you expected to happen?

Kubernetes to respond

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

Same steps as https://github.com/kubernetes/kubeadm/issues/1026

Anything else we need to know?

https://github.com/kubernetes/kubeadm/issues/1026

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

I somehow managed to get the cluster up and running by following the instructions in https://github.com/kubernetes/kubeadm/issues/881#issuecomment-396638808 i changed the hostname to localhost . I am also not sure what caused to fix my issue though.

I suspect it has something to do with etcd not able to resolve my localhost correctly

Managed to reproduce the issue on a local CentOS VM following the guide. It appears that after restart SELinux is activated and it messes up the container mounts.

The exact cause of failure is an error in the API server:

Error: unable to load server certificate: open /etc/kubernetes/pki/apiserver.crt: no such file or directory

The certs, static PODs and mounts in the actual containers were OK, but the API server was unable to access the file.

The issue is resolved by permanently disabling SELinux via /etc/sysconfig/selinux.

We need to update the getting started guide for CentOS though.

/kind documentation