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
- Revert kubeadm to 1.7.0-00 because https://github.com/kubernetes/kubernetes/issues/49065 — committed to kubicorn/kubicorn by krisnova 7 years ago
- Revert kubeadm to 1.7.0-00 because https://github.com/kubernetes/kubernetes/issues/49065 — committed to tedwardd/kubicorn by krisnova 7 years ago
- Revert kubeadm to 1.7.0-00 because https://github.com/kubernetes/kubernetes/issues/49065 — committed to tedwardd/kubicorn by krisnova 7 years ago
- Revert kubeadm to 1.7.0-00 because https://github.com/kubernetes/kubernetes/issues/49065 — committed to tedwardd/kubicorn by krisnova 7 years ago
- Update git submodules * Update docs/submodules/openretriever from branch 'master' - workaroud k8s deploy issue use kubeadm 1.7.0 to workaround deploy issue: https://github.com/kubernet... — committed to opnfv/opnfvdocs by RuijingGuo 7 years ago
- workaroud k8s deploy issue use kubeadm 1.7.0 to workaround deploy issue: https://github.com/kubernetes/kubernetes/issues/49065 Change-Id: I94802e3164c175515fd9934c8cd55ca8f90a8bd9 Signed-off-by: Guo... — committed to opnfv/openretriever by RuijingGuo 7 years ago
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
known issue, will be fixed in v1.7.2: https://github.com/kubernetes/kubeadm/issues/347 Please open kubeadm issues in the kubeadm repo
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.