Kubeadm: Node can't join to cluster

Created on 11 Sep 2018  ·  3Comments  ·  Source: kubernetes/kubeadm

BUG REPORT

Versions

kubeadm version (use kubeadm version):
kubeadm version: &version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.2", GitCommit:"bb9ffb1654d4a729bb4cec18ff088eacc153c239", GitTreeState:"clean", BuildDate:"2018-08-07T23:14:39Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Kubernetes version (use kubectl version):
    Server Version: version.Info{Major:"1", Minor:"11", GitVersion:"v1.11.3", GitCommit:"a4529464e4629c21224b3d52edfe0ea91b072862", GitTreeState:"clean", BuildDate:"2018-09-09T17:53:03Z", GoVersion:"go1.10.3", Compiler:"gc", Platform:"linux/amd64"}
  • OS (e.g. from /etc/os-release):
    CentOS Linux release 7.5.1804 (Core)
  • Kernel (e.g. uname -a):
    Linux 3.10.0-862.el7.x86_64

What happened?

[discovery] Failed to connect to API Server ":6443": token id "dwjwgo" is invalid for this cluster or it has expired. Use "kubeadm token create" on the master node to creating a new valid token

What you expected to happen?

A node joins to a cluster.

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

On the master:

kubeadm init --apiserver-advertise-address= --kubernetes-version=stable-1.11 --pod-network-cidr= --service-cidr=

kubeadm token create --ttl 0 --print-join-command
kubeadm join :6443 --token 6fbvvs.g0k7ygepxrcj4iwz --discovery-token-ca-cert-hash sha256:6331c00a2fa873d91b481fe55ffc3410006580ac5ca021a5c086b1869bd40e4b

On the node:

kubeadm join :6443 --token 6fbvvs.g0k7ygepxrcj4iwz --discovery-token-ca-cert-hash sha256:6331c00a2fa873d91b481fe55ffc3410006580ac5ca021a5c086b1869bd40e4b
[preflight] running pre-flight checks
[WARNING RequiredIPVSKernelModulesAvailable]: the IPVS proxier will not be used, because the following required kernel modules are not loaded: [ip_vs_sh ip_vs ip_vs_rr ip_vs_wrr] or no builtin kernel ipvs support: map[ip_vs_sh:{} nf_conntrack_ipv4:{} ip_vs:{} ip_vs_rr:{} ip_vs_wrr:{}]
you can solve this problem with following methods:

  1. Run 'modprobe -- ' to load missing kernel modules;

    1. Provide the missing builtin kernel ipvs support

I0911 12:17:44.349062 22906 kernel_validator.go:81] Validating kernel version
I0911 12:17:44.349204 22906 kernel_validator.go:96] Validating kernel config
[discovery] Trying to connect to API Server ":6443"
[discovery] Created cluster-info discovery client, requesting info from "https://:6443"
[discovery] Failed to connect to API Server ":6443": token id "6fbvvs" is invalid for this cluster or it has expired. Use "kubeadm token create" on the master node to creating a new valid token
[discovery] Trying to connect to API Server ":6443"
[discovery] Created cluster-info discovery client, requesting info from "https://:6443"
[discovery] Failed to connect to API Server ":6443": token id "6fbvvs" is invalid for this cluster or it has expired. Use "kubeadm token create" on the master node to creating a new valid token
^C

Any ideas?

All 3 comments

Failed to connect to API Server ":6443": token id "6fbvvs" is invalid for this cluster or it has expired. Use "kubeadm token create" on the master node to creating a new valid token

How about to create new token on master? Current one seems expired.

How about to create new token on master? Current one seems expired.

I want to emphasize the token's generated with ttl 0 and can't be expired.

The reason was 'Controller: Invalid --cluster-cidr, mask size of cluster CIDR must be less than --node-cidr-mask-size'

Was this page helpful?
0 / 5 - 0 ratings