kubeadm join failing on Pi 3 model B. cannot create certificate signing request: the server could not find the requested resource

4/28/2017

I have set up a cluster of four Raspberry Pi 3 Model B and installed HypriotOS. The master node is running fine however when I issue the join command on one of the other Pi 3 nodes it fails with the following error:

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]

I have tried these solutions and neither of them work, I get the same error on any of the other three Pi nodes when running the join. kubeadm join failing. Unable to request signed cert

To replicate this just follow this set up procedure https://blog.hypriot.com/post/setup-kubernetes-raspberry-pi-cluster/

Can anyone help with my understanding of what is going wrong and how to fix as I cannot find a solution on the Kubernetes trouble shooting?

To help by responding to Karun's the question about using the --skip-preflight-checks flag. When running the join command without this it simply fails with the following:

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`

The --skip-preflight-checks flag was also required to get the master node running. I therefore assume this issue must be arm specific as the solution to copy

/etc/kubernetes/*

from the master also fails to solve the issue.

-- Andrew
kubernetes
raspberry-pi

1 Answer

5/1/2017

Any reason why you are passing --skip-preflight-checks as a flag in your kubeadm join command? Anything failing there? May be that can lead to some clues.

I have not worked on Raspberry, but I faced this sort of an issue on Ubuntu env. For some reason on slave node ('am firing kubeadm join command) /etc/kubernetes folder wasn't there. I just copied from master node contents of /etc/kubernetes/* into slave nodes at same location /etc/kubernetes.

After this run kubeadm join with --skip-preflight-checks explicity.

This time kubeadm got the required resources and

-- karun
Source: StackOverflow