在Pi 3模型B上kubeadm加入失败。无法创建证书签名请求:服务器找不到请求的资源

时间:2017-04-28 13:26:13

标签: raspberry-pi kubernetes

我已经建立了一个由四个Raspberry Pi 3 Model B组成的集群并安装了HypriotOS。 主节点运行正常但是当我在其他Pi 3节点之一上发出join命令时,它失败并出现以下错误:

HypriotOS/armv7: root@black-pearl_1 in ~
$ kubeadm join --token=f5ffb9.0fefbf6e0f289a61 192.168.1.20 --skip-preflight-checks
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[tokens] Validating provided token
[discovery] Created cluster info discovery client, requesting info from "http://192.168.1.20:9898/cluster-info/v1/?token-id=f5ffb9"
[discovery] Cluster info object received, verifying signature using given token
[discovery] Cluster info signature and contents are valid, will use API endpoints [https://192.168.1.20:6443]
[bootstrap] Trying to connect to endpoint https://192.168.1.20:6443
[bootstrap] Detected server version: v1.6.0
[bootstrap] Successfully established connection with endpoint "https://192.168.1.20:6443"
[csr] Created API client to obtain unique certificate for this node, generating keys and certificate signing request
failed to request signed certificate from the API server [cannot create certificate signing request: the server could not find the requested resource]

我已经尝试过这些解决方案并且它们都不起作用,我在运行连接时在其他三个Pi节点上得到相同的错误。 kubeadm join failing. Unable to request signed cert

要复制此操作,请按照此设置步骤进行操作 https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/

任何人都可以帮助我理解出了什么问题以及如何修复,因为我无法找到解决Kubernetes问题的解决方案吗?

通过回答Karun关于使用--skip-preflight-checks标志的问题来提供帮助。在没有这个的情况下运行join命令时,它会失败并显示以下内容:

HypriotOS/armv7: root@black-pearl_2 in ~
$ kubeadm join --token=f5ffb9.0fefbf6e0f289a61 192.168.1.20
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Running pre-flight checks
[preflight] The system verification failed. Printing the output from the verification:
OS: Linux
KERNEL_VERSION: 4.4.50-hypriotos-v7+
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: enabled
CONFIG_INET: enabled
CONFIG_EXT4_FS: enabled
CONFIG_PROC_FS: enabled
CONFIG_NETFILTER_XT_TARGET_REDIRECT: enabled (as module)
CONFIG_NETFILTER_XT_MATCH_COMMENT: enabled (as module)
CONFIG_OVERLAY_FS: enabled (as module)
CONFIG_AUFS_FS: not set - Required for aufs.
CONFIG_BLK_DEV_DM: enabled (as module)
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
DOCKER_VERSION: 17.03.0-ce
[preflight] Some fatal errors occurred:
    unsupported docker version: 17.03.0-ce
    hostname "black-pearl_2" must match the regex [a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)* (e.g. 'example.com')
    Port 10250 is in use
    /etc/kubernetes/manifests is not empty
    /var/lib/kubelet is not empty
    /etc/kubernetes/kubelet.conf already exists
[preflight] If you know what you are doing, you can skip pre-flight checks with `--skip-preflight-checks`

还需要--skip-preflight-checks标志才能使主节点运行。因此,我认为这个问题必须是特定的,作为复制的解决方案

/etc/kubernetes/*
来自主人的

也未能解决问题。

1 个答案:

答案 0 :(得分:0)

您在kubeadm join命令中将--skip-preflight-checks作为标志传递的原因是什么?有什么失败的吗?可能会导致一些线索。

我没有在Raspberry上工作过,但我在Ubuntu环境中遇到过这种问题。由于某种原因在奴隶节点('am kick kubeadm join命令)/ etc / kubernetes文件夹不存在。我只是从/ etc / kubernetes / *的主节点内容复制到相同位置/ etc / kubernetes的从节点。

在此运行之后,kubeadm与--skip-preflight-immediately明确地联接。

这次kubeadm获得了所需的资源和