<h2 dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):<br>
No<br>
<strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):<br>
'&lt;node/discovery&gt; failed to parse response as JWS object [square/go-jose: compact JWS format must have three parts]'</h2>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):<br>
BUG REPORT</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):<br>
Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}</p>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li><strong>Cloud provider or hardware configuration</strong>:</li>
<li><strong>OS</strong> (e.g. from /etc/os-release): Centos 7.1</li>
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>): 4.1.12-37.5.1.el7uek.x86_64 <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="35192602" data-permission-text="Title is private" data-url="https://github.com/kubernetes/kubernetes/issues/2" data-hovercard-type="issue" data-hovercard-url="/kubernetes/kubernetes/issues/2/hovercard" href="https://github.com/kubernetes/kubernetes/issues/2">#2</a> SMP Thu Jun 9 16:01:20 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux</li>
<li><strong>Install tools</strong>:</li>
<li><strong>Others</strong>:</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
Failed with error:<br>
&lt;node/discovery&gt; failed to parse response as JWS object [square/go-jose: compact JWS format must have three parts]</p>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
The cluster should be able to join the master node</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):</p>
<ol dir="auto">
<li>kubeadm init on master</li>
<li>kubeadm join on cluster</li>
</ol>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
kubeadm version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.2.380+85fe0f1aadf91e", GitCommit:"85fe0f1aadf91e134102cf3c01a9eed11a7e257f", GitTreeState:"clean", BuildDate:"2016-11-02T14:58:17Z", GoVersion:"go1.7.1", Compiler:"gc", Platform:"linux/amd64"}<br>
For kube-discovery image</p>
<blockquote>
<p dir="auto">docker inspect <br>
[root@ovm21 ~]# docker inspect c5e0c9a457fc<br>
[<br>
{<br>
"Id": "sha256:c5e0c9a457fcb53ac5c564656f3fabba733ab1e8187e98d095c88356b9245de8",<br>
"RepoTags": [<br>
"gcr.io/google_containers/kube-discovery-amd64:1.0"<br>
],<br>
"RepoDigests": [<br>
"gcr.io/google_containers/kube-discovery-amd64@sha256:7ebce8129c41bf64053f56a4f4418e198265b104b17f3f2d5b61667e208528f4"<br>
],<br>
"Parent": "",<br>
"Comment": "",<br>
"Created": "2016-09-24T17:16:49.942311731Z",<br>
"Container": "5581c81bd1defe34d67a2c267841bc164e0decd53b1a9114b745585e628de106",<br>
"ContainerConfig": {<br>
"Hostname": "6250540837a8",<br>
"Domainname": "",<br>
"User": "",<br>
"AttachStdin": false,<br>
"AttachStdout": false,<br>
"AttachStderr": false,<br>
"Tty": false,<br>
"OpenStdin": false,<br>
"StdinOnce": false,<br>
"Env": [<br>
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"<br>
],<br>
"Cmd": [<br>
"/bin/sh",<br>
"-c",<br>
"#(nop) ENTRYPOINT \u0026{["/bin/sh" "-c" "\"/usr/local/bin/kube-discovery\""]}"<br>
],<br>
"Image": "2b3aeb5c0ccc7b85afa3c110b8b6fc3698f1da723f4845cd4250895c599393e1",<br>
"Volumes": null,<br>
"WorkingDir": "",<br>
"Entrypoint": [<br>
"/bin/sh",<br>
"-c",<br>
""/usr/local/bin/kube-discovery""<br>
],<br>
"OnBuild": [],<br>
"Labels": {}<br>
},<br>
"DockerVersion": "1.9.1",<br>
"Author": "",<br>
"Config": {<br>
"Hostname": "6250540837a8",<br>
"Domainname": "",<br>
"User": "",<br>
"AttachStdin": false,<br>
"AttachStdout": false,<br>
"AttachStderr": false,<br>
"Tty": false,<br>
"OpenStdin": false,<br>
"StdinOnce": false,<br>
"Env": [<br>
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"<br>
],<br>
"Cmd": null,<br>
"Image": "2b3aeb5c0ccc7b85afa3c110b8b6fc3698f1da723f4845cd4250895c599393e1",<br>
"Volumes": null,<br>
"WorkingDir": "",<br>
"Entrypoint": [<br>
"/bin/sh",<br>
"-c",<br>
""/usr/local/bin/kube-discovery""<br>
],<br>
"OnBuild": [],<br>
"Labels": {}<br>
},<br>
"Architecture": "amd64",<br>
"Os": "linux",<br>
"Size": 134164555,<br>
"VirtualSize": 134164555,<br>
"GraphDriver": {<br>
"Name": "btrfs",<br>
"Data": null<br>
},<br>
"RootFS": {<br>
"Type": "layers",<br>
"Layers": [<br>
"sha256:42755cf4ee95900a105b4e33452e787026ecdefffcc1992f961aa286dc3f7f95",<br>
"sha256:7815ca90458efad6a994cbe56b123737a3b92c472493d5581fb960821680a338",<br>
"sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef"<br>
]<br>
}<br>
}<br>
]</p>
</blockquote>
<p dir="auto"><strong>Is this a request for help?</strong> (If yes, you should use our troubleshooting guide and community support channels, see <a href="http://kubernetes.io/docs/troubleshooting/" rel="nofollow">http://kubernetes.io/docs/troubleshooting/</a>.):</p>
<p dir="auto">No.</p>
<p dir="auto"><strong>What keywords did you search in Kubernetes issues before filing this one?</strong> (If you have found any duplicates, you should instead reply there.):</p>
<ul dir="auto">
<li>kubectl join</li>
<li>preflight</li>
<li>kubelet is not empty</li>
</ul>
<hr>
<p dir="auto"><strong>Is this a BUG REPORT or FEATURE REQUEST?</strong> (choose one):</p>
<p dir="auto">BUG REPORT</p>

<p dir="auto"><strong>Kubernetes version</strong> (use <code class="notranslate">kubectl version</code>):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Client Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.4&quot;, GitCommit:&quot;3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-10-21T02:48:38Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}
Server Version: version.Info{Major:&quot;1&quot;, Minor:&quot;4&quot;, GitVersion:&quot;v1.4.4&quot;, GitCommit:&quot;3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56&quot;, GitTreeState:&quot;clean&quot;, BuildDate:&quot;2016-10-21T02:42:39Z&quot;, GoVersion:&quot;go1.6.3&quot;, Compiler:&quot;gc&quot;, Platform:&quot;linux/amd64&quot;}"><pre class="notranslate"><code class="notranslate">Client Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:48:38Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"4", GitVersion:"v1.4.4", GitCommit:"3b417cc4ccd1b8f38ff9ec96bb50a81ca0ea9d56", GitTreeState:"clean", BuildDate:"2016-10-21T02:42:39Z", GoVersion:"go1.6.3", Compiler:"gc", Platform:"linux/amd64"}
</code></pre></div>
<p dir="auto"><strong>Environment</strong>:</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Cloud provider or hardware configuration</strong>:<br>
AWS EC2 Classic ami-45b69e52 m3.2xlarge instance type in us-east-1 region.</p>
</li>
<li>
<p dir="auto"><strong>OS</strong> (e.g. from /etc/os-release):</p>
</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="NAME=&quot;Ubuntu&quot;
VERSION=&quot;16.04.1 LTS (Xenial Xerus)&quot;
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=&quot;Ubuntu 16.04.1 LTS&quot;
VERSION_ID=&quot;16.04&quot;
HOME_URL=&quot;http://www.ubuntu.com/&quot;
SUPPORT_URL=&quot;http://help.ubuntu.com/&quot;
BUG_REPORT_URL=&quot;http://bugs.launchpad.net/ubuntu/&quot;
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial"><pre class="notranslate"><code class="notranslate">NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 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
</code></pre></div>
<ul dir="auto">
<li><strong>Kernel</strong> (e.g. <code class="notranslate">uname -a</code>):</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Linux ip-10-159-146-253 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux"><pre class="notranslate"><code class="notranslate">Linux ip-10-159-146-253 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
</code></pre></div>
<ul dir="auto">
<li><strong>Install tools</strong>:<br>
N/A</li>
<li><strong>Others</strong>:<br>
N/A</li>
</ul>
<p dir="auto"><strong>What happened</strong>:<br>
I was standing up a 3-node cluster following the instructions here: <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/kubeadm/</a></p>
<p dir="auto">Commands I ran on each slave:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo su -
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat &lt;&lt;EOF &gt; /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y docker.io
apt-get install -y kubelet kubeadm kubectl kubernetes-cni"><pre class="notranslate"><code class="notranslate">sudo su -
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat &lt;&lt;EOF &gt; /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y docker.io
apt-get install -y kubelet kubeadm kubectl kubernetes-cni
</code></pre></div>
<p dir="auto">Additional commands run on the master:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="kubeadm init --pod-network-cidr=10.244.0.0/16
kubectl apply -f flannel.yml"><pre class="notranslate"><code class="notranslate">kubeadm init --pod-network-cidr=10.244.0.0/16
kubectl apply -f flannel.yml
</code></pre></div>
<p dir="auto">flannel.yml:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="---
kind: ConfigMap
apiVersion: v1
metadata:
  name: kube-flannel-cfg
  namespace: kube-system
  labels:
    tier: node
    app: flannel
data:
  cni-conf.json: |
    {
      &quot;name&quot;: &quot;cbr0&quot;,
      &quot;type&quot;: &quot;flannel&quot;,
      &quot;delegate&quot;: {
        &quot;isDefaultGateway&quot;: true
      }
    }
  net-conf.json: |
    {
      &quot;Network&quot;: &quot;10.244.0.0/16&quot;,
      &quot;Backend&quot;: {
        &quot;Type&quot;: &quot;vxlan&quot;
      }
    }
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: amd64
      containers:
      - name: kube-flannel
        image: quay.io/coreos/flannel-git:v0.6.1-28-g5dde68d-amd64
        command: [ &quot;/opt/bin/flanneld&quot;, &quot;--ip-masq&quot;, &quot;--kube-subnet-mgr&quot; ]
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      - name: install-cni
        image: quay.io/coreos/flannel-git:v0.6.1-28-g5dde68d-amd64
        command: [ &quot;/bin/sh&quot;, &quot;-c&quot;, &quot;set -e -x; cp -f /etc/kube-flannel/cni-conf.json /etc/cni/net.d/10-flannel.conf; while true; do sleep 3600; done&quot; ]
        volumeMounts:
        - name: cni
          mountPath: /etc/cni/net.d
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg"><pre class="notranslate"><code class="notranslate">---
kind: ConfigMap
apiVersion: v1
metadata:
  name: kube-flannel-cfg
  namespace: kube-system
  labels:
    tier: node
    app: flannel
data:
  cni-conf.json: |
    {
      "name": "cbr0",
      "type": "flannel",
      "delegate": {
        "isDefaultGateway": true
      }
    }
  net-conf.json: |
    {
      "Network": "10.244.0.0/16",
      "Backend": {
        "Type": "vxlan"
      }
    }
---
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: kube-flannel-ds
  namespace: kube-system
  labels:
    tier: node
    app: flannel
spec:
  template:
    metadata:
      labels:
        tier: node
        app: flannel
    spec:
      hostNetwork: true
      nodeSelector:
        beta.kubernetes.io/arch: amd64
      containers:
      - name: kube-flannel
        image: quay.io/coreos/flannel-git:v0.6.1-28-g5dde68d-amd64
        command: [ "/opt/bin/flanneld", "--ip-masq", "--kube-subnet-mgr" ]
        securityContext:
          privileged: true
        env:
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        volumeMounts:
        - name: run
          mountPath: /run
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      - name: install-cni
        image: quay.io/coreos/flannel-git:v0.6.1-28-g5dde68d-amd64
        command: [ "/bin/sh", "-c", "set -e -x; cp -f /etc/kube-flannel/cni-conf.json /etc/cni/net.d/10-flannel.conf; while true; do sleep 3600; done" ]
        volumeMounts:
        - name: cni
          mountPath: /etc/cni/net.d
        - name: flannel-cfg
          mountPath: /etc/kube-flannel/
      volumes:
        - name: run
          hostPath:
            path: /run
        - name: cni
          hostPath:
            path: /etc/cni/net.d
        - name: flannel-cfg
          configMap:
            name: kube-flannel-cfg
</code></pre></div>
<p dir="auto">ssh-d onto slave node and ran - as per the documentation - (anonymised to protect the not-so-innocent):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="sudo su - 
kubeadm join --token=[TOKEN] [MASTER IP]"><pre class="notranslate"><code class="notranslate">sudo su - 
kubeadm join --token=[TOKEN] [MASTER IP]
</code></pre></div>
<p dir="auto">Output was:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Running pre-flight checks
preflight check errors:
	/var/lib/kubelet is not empty"><pre class="notranslate"><code class="notranslate">Running pre-flight checks
preflight check errors:
	/var/lib/kubelet is not empty
</code></pre></div>
<p dir="auto"><strong>What you expected to happen</strong>:<br>
I expected the node to join the cluster and output data according to the docs: <a href="http://kubernetes.io/docs/getting-started-guides/kubeadm/" rel="nofollow">http://kubernetes.io/docs/getting-started-guides/kubeadm/</a></p>
<p dir="auto">As I understand the architecture, each node has to have a kubelet on it. I have a feeling that some preflight checks have been added for something else, reused for this and aren't quite appropriate. I may be wrong, though!</p>
<p dir="auto"><strong>How to reproduce it</strong> (as minimally and precisely as possible):<br>
Create three AWS EC2 Classic ami-45b69e52 m3.2xlarge instance type in us-east-1 region.<br>
Run the commands as I did.</p>
<p dir="auto"><strong>Anything else do we need to know</strong>:<br>
No.</p>