kubernetes: kubeadm cannot work with machines that cannot resolve their own host

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

null_resource.kubeadm_join.1 (remote-exec): [kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
null_resource.kubeadm_join.1 (remote-exec): [preflight] Running pre-flight checks
null_resource.kubeadm_join.0 (remote-exec): [preflight] Some fatal errors occurred:
null_resource.kubeadm_join.0 (remote-exec):     hostname "" a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with analphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
null_resource.kubeadm_join.0 (remote-exec): [preflight] If you know what you are doing,you can skip pre-flight checks with `--skip-preflight-checks`
null_resource.kubeadm_join.1 (remote-exec): [preflight] WARNING: hostname "" could not be reached
null_resource.kubeadm_join.1 (remote-exec): [preflight] WARNING: hostname "" lookup : no such host
null_resource.kubeadm_join.1 (remote-exec): [preflight] Some fatal errors occurred:
null_resource.kubeadm_join.1 (remote-exec):     hostname "" a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with analphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
null_resource.kubeadm_join.1 (remote-exec): [preflight] If you know what you are doing,you can skip pre-flight checks with `--skip-preflight-checks`

What you expected to happen:

Just some plain ol’ joining and initializing.

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

should just be able to kubeadm init/join with some machines that do not have resolvable hostnames. I don’t even know if CentOS is a requirement.

Anything else we need to know?:

Centos 7.3, provisioned by terraform into a private ESX cluster. DNS is working just fine, but the machines do not have reverse lookup. IP addresses are used throughout.

Sorry, I cannot share detailed infrastructure data.

$ kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.1", GitCommit:"1dc5c66f5dd61da08412a74221ecc79208c2165b", GitTreeState:"clean", BuildDate:"2017-07-14T01:48:01Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

I think https://github.com/kubernetes/kubernetes/pull/40771/files is the problem. net.LookupHost only considers DNS. Should fallback to os.Hostname literal response.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 4
  • Comments: 28 (11 by maintainers)

Commits related to this issue

Most upvoted comments

kubeadm 1.7.2 -> issue still there

Just do --skip-preflight-checks until tomorrow 😉

v1.7.2 is planned for tomorrow and will have the fix

On 18 Jul 2017, at 22:38, Kris Nova notifications@github.com wrote:

Seeing this is kubicorn at the moment - do we have an ETA on a 1.7.2 release or a patch for kubeadm?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

known issue, will be fixed in v1.7.2: https://github.com/kubernetes/kubeadm/issues/347 Please open kubeadm issues in the kubeadm repo

The syntax for installing 1.7.0 on Ubuntu is:

apt-get install kubeadm=1.7.0-00 -y --allow-downgrades

This is what I needed, for anyone else landing here.

maybe I’m reading the code wrong, and it needs to consider net.Interfaces() instead, or there should be a flag for it. Either way this feels pretty broken atm, and worked fine about 2 weeks ago.