Kubernetes' Kubeadm在apiclient停止

时间:2017-08-15 08:12:06

标签: kubernetes kubeadm

我在DigitalOcean上创建了一个新的Ubuntu 16.04 Droplet,并分别按照这些指南安装kubeadm(及其依赖项):

https://docs.docker.com/engine/installation/

https://kubernetes.io/docs/tasks/tools/install-kubectl/

https://kubernetes.io/docs/setup/independent/install-kubeadm/

然而,当我运行kubeadm init时,我得到:

root@ubuntu-512mb-nyc3-01:~# kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker version is greater than the most recently validated version. Docker version: 17.06.0-ce. Max validated version: 1.12
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [ubuntu-512mb-nyc3-01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 165.227.70.168]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready

我甚至试图创建一个新的CentOS 7 Droplet来应用CentOS的不同指令,我也遇到了同样的问题。

以下是自我创建VPS以来我应用的完整历史记录:

Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-87-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

0 packages can be updated.
0 updates are security updates.



The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

Changing password for root.
(current) UNIX password: 
Enter new UNIX password: 
Retype new UNIX password: 
root@ubuntu-512mb-nyc3-01:~# apt update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Get:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease [102 kB]
Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease [102 kB]
Get:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/main Sources [868 kB]
Get:6 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/restricted Sources [4,808 B]
Get:7 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe Sources [7,728 kB]
Get:8 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/multiverse Sources [179 kB]
Get:9 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main Sources [265 kB]
Get:10 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/restricted Sources [3,012 B]
Get:11 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe Sources [166 kB]
Get:12 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/multiverse Sources [7,232 B]
Get:13 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 Packages [593 kB]
Get:14 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/main Translation-en [240 kB]
Get:15 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe amd64 Packages [511 kB]
Get:16 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates/universe Translation-en [199 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/main Sources [86.5 kB]
Get:18 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/main Sources [3,312 B]
Get:19 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,604 B]
Get:21 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [38.2 kB]
Get:20 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/universe Sources [4,400 B]
Get:22 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports/universe amd64 Packages [5,804 B]
Get:23 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,144 B]
Get:24 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [341 kB]
Get:25 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [144 kB]
Get:26 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [155 kB]
Get:27 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [79.4 kB]
Get:28 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [2,752 B]
Fetched 11.9 MB in 3s (3,327 kB/s)             
ade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@ubuntu-512mb-nyc3-01:~# apt pgrade
E: Invalid operation pgrade
root@ubuntu-512mb-nyc3-01:~# apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  linux-headers-4.4.0-91 linux-headers-4.4.0-91-generic
  linux-image-4.4.0-91-generic
The following packages will be upgraded:
  git git-man linux-headers-generic linux-headers-virtual
  linux-image-virtual linux-virtual
6 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 36.5 MB of archives.
After this operation, 145 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 git-man all 1:2.7.4-0ubuntu1.2 [736 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 git amd64 1:2.7.4-0ubuntu1.2 [3,163 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-4.4.0-91 all 4.4.0-91.114 [9,876 kB]
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-4.4.0-91-generic amd64 4.4.0-91.114 [791 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-image-4.4.0-91-generic amd64 4.4.0-91.114 [21.9 MB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-virtual amd64 4.4.0.91.96 [1,780 B]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-image-virtual amd64 4.4.0.91.96 [2,270 B]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-virtual amd64 4.4.0.91.96 [1,760 B]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main amd64 linux-headers-generic amd64 4.4.0.91.96 [2,262 B]
Fetched 36.5 MB in 0s (40.0 MB/s)           
(Reading database ... 54209 files and directories currently installed.)
Preparing to unpack .../git-man_1%3a2.7.4-0ubuntu1.2_all.deb ...
Unpacking git-man (1:2.7.4-0ubuntu1.2) over (1:2.7.4-0ubuntu1.1) ...
Preparing to unpack .../git_1%3a2.7.4-0ubuntu1.2_amd64.deb ...
Unpacking git (1:2.7.4-0ubuntu1.2) over (1:2.7.4-0ubuntu1.1) ...
Selecting previously unselected package linux-headers-4.4.0-91.
Preparing to unpack .../linux-headers-4.4.0-91_4.4.0-91.114_all.deb ...
Unpacking linux-headers-4.4.0-91 (4.4.0-91.114) ...
Selecting previously unselected package linux-headers-4.4.0-91-generic.
Preparing to unpack .../linux-headers-4.4.0-91-generic_4.4.0-91.114_amd64.deb ...
Unpacking linux-headers-4.4.0-91-generic (4.4.0-91.114) ...
Selecting previously unselected package linux-image-4.4.0-91-generic.
Preparing to unpack .../linux-image-4.4.0-91-generic_4.4.0-91.114_amd64.deb ...
Done.
Unpacking linux-image-4.4.0-91-generic (4.4.0-91.114) ...
Preparing to unpack .../linux-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-image-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-image-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-headers-virtual_4.4.0.91.96_amd64.deb ...
Unpacking linux-headers-virtual (4.4.0.91.96) over (4.4.0.87.93) ...
Preparing to unpack .../linux-headers-generic_4.4.0.91.96_amd64.deb ...
Unpacking linux-headers-generic (4.4.0.91.96) over (4.4.0.87.93) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up git-man (1:2.7.4-0ubuntu1.2) ...
Setting up git (1:2.7.4-0ubuntu1.2) ...
Setting up linux-headers-4.4.0-91 (4.4.0-91.114) ...
Setting up linux-headers-4.4.0-91-generic (4.4.0-91.114) ...
Setting up linux-image-4.4.0-91-generic (4.4.0-91.114) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-91-generic
W: mdadm: /etc/mdadm/mdadm.conf defines no arrays.
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-91-generic /boot/vmlinuz-4.4.0-91-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-91-generic
Found initrd image: /boot/initrd.img-4.4.0-91-generic
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
done
Setting up linux-image-virtual (4.4.0.91.96) ...
Setting up linux-headers-generic (4.4.0.91.96) ...
Setting up linux-headers-virtual (4.4.0.91.96) ...
Setting up linux-virtual (4.4.0.91.96) ...
root@ubuntu-512mb-nyc3-01:~# sudo apt-get install \
>     apt-transport-https \
>     ca-certificates \
>     curl \
>     software-properties-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version (20160104ubuntu1).
apt-transport-https is already the newest version (1.2.24).
curl is already the newest version (7.47.0-1ubuntu2.2).
software-properties-common is already the newest version (0.96.20.7).
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu-512mb-nyc3-01:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
root@ubuntu-512mb-nyc3-01:~# sudo add-apt-repository \
>    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
>    $(lsb_release -cs) \
>    stable"
root@ubuntu-512mb-nyc3-01:~# apt update
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease       
Get:5 https://download.docker.com/linux/ubuntu xenial InRelease [38.9 kB]
Get:6 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [1,966 B]
Fetched 40.9 kB in 0s (56.7 kB/s)
sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
root@ubuntu-512mb-nyc3-01:~# sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  aufs-tools cgroupfs-mount libltdl7
Suggested packages:
  mountall
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount docker-ce libltdl7
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 20.6 MB of archives.
After this operation, 96.6 MB of additional disk space will be used.
Get:2 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 17.06.0~ce-0~ubuntu [20.5 MB]
Get:1 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe amd64 aufs-tools amd64 1:3.2+20130722-1.1ubuntu1 [92.9 kB]
Get:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/universe amd64 cgroupfs-mount all 1.2 [4,970 B]
Get:4 http://nyc2.mirrors.digitalocean.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB]
Fetched 20.6 MB in 0s (23.2 MB/s)     
Selecting previously unselected package aufs-tools.
(Reading database ... 82102 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.2_all.deb ...
Unpacking cgroupfs-mount (1.2) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-0.1) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_17.06.0~ce-0~ubuntu_amd64.deb ...
Unpacking docker-ce (17.06.0~ce-0~ubuntu) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ...
Setting up cgroupfs-mount (1.2) ...
Setting up libltdl7:amd64 (2.4.6-0.1) ...
Setting up docker-ce (17.06.0~ce-0~ubuntu) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu-512mb-nyc3-01:~# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b04784fba78d: Pull complete 
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

root@ubuntu-512mb-nyc3-01:~#  curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--   1 68.9M    1  995k    0     0  2613k      0  0:00:27 --:--:--  0:00:27 100 68.9M  100 68.9M    0     0  72.8M      0 --:--:-- --:--:-- --:--:-- 72.8M
root@ubuntu-512mb-nyc3-01:~#  chmod +x ./kubectl 
root@ubuntu-512mb-nyc3-01:~#  sudo mv ./kubectl /usr/local/bin/kubectl 
root@ubuntu-512mb-nyc3-01:~# kubectl cluster-info

Kubernetes master is running at http://localhost:8080

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
root@ubuntu-512mb-nyc3-01:~# 
root@ubuntu-512mb-nyc3-01:~# apt-get update && apt-get install -y apt-transport-https
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:3 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:4 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:5 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apt-transport-https is already the newest version (1.2.24).
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@ubuntu-512mb-nyc3-01:~# curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
OK
root@ubuntu-512mb-nyc3-01:~# cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
> deb http://apt.kubernetes.io/ kubernetes-xenial main
> EOF
root@ubuntu-512mb-nyc3-01:~# apt-get update
Hit:1 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:2 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease   
Hit:3 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease 
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease       
Hit:6 https://download.docker.com/linux/ubuntu xenial InRelease         
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial InRelease [8,942 B]
Get:7 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 Packages [4,977 B]
Fetched 13.9 kB in 0s (16.0 kB/s)
Reading package lists... Done
root@ubuntu-512mb-nyc3-01:~# apt-get install -y kubelet kubeadm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  grub-pc-bin
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  ebtables kubectl kubernetes-cni socat
The following NEW packages will be installed:
  ebtables kubeadm kubectl kubelet kubernetes-cni socat
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 45.4 MB of archives.
After this operation, 334 MB of additional disk space will be used.
Get:1 http://mirrors.digitalocean.com/ubuntu xenial-updates/main amd64 ebtables amd64 2.0.10.4-3.4ubuntu2 [79.4 kB]
Get:2 http://mirrors.digitalocean.com/ubuntu xenial/universe amd64 socat amd64 1.7.3.1-1 [321 kB]
Get:3 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubernetes-cni amd64 0.5.1-00 [5,560 kB]
Get:4 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubelet amd64 1.7.3-01 [19.6 MB]
Get:5 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubectl amd64 1.7.3-01 [10.1 MB]
Get:6 https://packages.cloud.google.com/apt kubernetes-xenial/main amd64 kubeadm amd64 1.7.3-01 [9,796 kB]
Fetched 45.4 MB in 4s (10.2 MB/s)    
Selecting previously unselected package ebtables.
(Reading database ... 82383 files and directories currently installed.)
Preparing to unpack .../ebtables_2.0.10.4-3.4ubuntu2_amd64.deb ...
Unpacking ebtables (2.0.10.4-3.4ubuntu2) ...
Selecting previously unselected package kubernetes-cni.
Preparing to unpack .../kubernetes-cni_0.5.1-00_amd64.deb ...
Unpacking kubernetes-cni (0.5.1-00) ...
Selecting previously unselected package socat.
Preparing to unpack .../socat_1.7.3.1-1_amd64.deb ...
Unpacking socat (1.7.3.1-1) ...
Selecting previously unselected package kubelet.
Preparing to unpack .../kubelet_1.7.3-01_amd64.deb ...
Unpacking kubelet (1.7.3-01) ...
Selecting previously unselected package kubectl.
Preparing to unpack .../kubectl_1.7.3-01_amd64.deb ...
Unpacking kubectl (1.7.3-01) ...
Selecting previously unselected package kubeadm.
Preparing to unpack .../kubeadm_1.7.3-01_amd64.deb ...
Unpacking kubeadm (1.7.3-01) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ebtables (2.0.10.4-3.4ubuntu2) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up kubernetes-cni (0.5.1-00) ...
Setting up socat (1.7.3.1-1) ...
Setting up kubelet (1.7.3-01) ...
Setting up kubectl (1.7.3-01) ...
Setting up kubeadm (1.7.3-01) ...
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
root@ubuntu-512mb-nyc3-01:~# kubeadm init
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] WARNING: docker version is greater than the most recently validated version. Docker version: 17.06.0-ce. Max validated version: 1.12
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [ubuntu-512mb-nyc3-01 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 165.227.70.168]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front-proxy CA certificate and key.
[certificates] Generated front-proxy client certificate and key.
[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting for the control plane to become ready
^C

这是来自journalctl的日志:https://pastebin.com/S6Tkak3P

1 个答案:

答案 0 :(得分:0)

How long did you wait for it to be ready? Note that it takes a bit in that step. Moreover, in the journalctl logs there are errors regarding the cni network not being ready, which is something expected. Could you try again and waiting a bit longer?