Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kubeadm 1.8.0 init fails with "/var/lib/kubelet is not empty" #53356

@wjrogers

Description

@wjrogers

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:
On a fresh Ubuntu 16.04.3 system booted from the official cloud image, kubeadm init fails because /var/lib/kubelet exists.

root@kubemaster:~# kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.8.0
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] Some fatal errors occurred:
        /var/lib/kubelet is not empty
[preflight] If you know what you are doing, you can skip pre-flight checks with `--skip-preflight-checks`

What you expected to happen:
kubeadm successfully initializes the cluster

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

  1. Boot a new VM from the latest Ubuntu Cloud image
  2. apt-get install -y apt-transport-https docker.io
  3. Follow the kubeadm installation instructions
  4. kubeadm init

Anything else we need to know?:
Contents of /var/lib/kubelet:

/var/lib/kubelet
/var/lib/kubelet/pki
/var/lib/kubelet/pki/kubelet.crt
/var/lib/kubelet/pki/kubelet.key

Environment:

  • Kubernetes version (use kubectl version):
    root@kubemaster:~# kubectl version
    Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.0", GitCommit:"6e937839ac04a38cac63e6a7a306c5d035fe7b0a", GitTreeState:"clean", BuildDate:"2017-09-28T22:57:57Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
    The connection to the server localhost:8080 was refused - did you specify the right host or port?
    
    root@kubemaster:~# apt search kube
    Sorting... Done
    Full Text Search... Done
    kubeadm/kubernetes-xenial,now 1.8.0-01 amd64 [installed]
      Kubernetes Cluster Bootstrapping Tool
    
    kubectl/kubernetes-xenial,now 1.8.0-00 amd64 [installed,automatic]
      Kubernetes Command Line Tool
    
    kubelet/kubernetes-xenial,now 1.8.0-00 amd64 [installed,automatic]
      Kubernetes Node Agent
    
    kubernetes-cni/kubernetes-xenial,now 0.5.1-00 amd64 [installed,automatic]
      Kubernetes CNI
    
  • Cloud provider or hardware configuration: Hyper-V generation 1 virtual machine
  • OS (e.g. from /etc/os-release):
    NAME="Ubuntu"
    VERSION="16.04.3 LTS (Xenial Xerus)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 16.04.3 LTS"
    VERSION_ID="16.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    VERSION_CODENAME=xenial
    UBUNTU_CODENAME=xenial
    
  • Kernel (e.g. uname -a): Linux kubemaster 4.4.0-96-generic #119-Ubuntu SMP Tue Sep 12 14:59:54 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: none
  • Others: none

Metadata

Metadata

Labels

area/kubeadmkind/bugCategorizes issue or PR as related to a bug.milestone/needs-approvalpriority/critical-urgentHighest priority. Must be actively worked on as someone's top priority right now.sig/cluster-lifecycleCategorizes an issue or PR as relevant to SIG Cluster Lifecycle.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions