Kubernetes : hostname regex failed

Trying to run kubeadm init

[root@ts_kubernetes_setup ~]# kubeadm init
[kubeadm] WARNING: kubeadm is in alpha, please do not use it for production clusters.
[preflight] Running pre-flight checks
[preflight] WARNING: firewalld is active, please ensure ports [6443 9898 10250] are open or your cluster may not function correctly
[preflight] Some fatal errors occurred:
        hostname "ts_kubernetes_setup.localdomain" 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')
[preflight] If you know what you are doing, you can skip pre-flight checks with `--skip-preflight-checks`
[root@ts_kubernetes_setup ~]#

Shows error on hostname. Can i run kudeadm on this machine?

  • For some reason I can't restart a script
  • Running IBM DOORS in a docker container
  • Domain name setup to docker instance
  • meteor up listen tcp bind: address already in use
  • Can't connect to Neo
  • Docker for windows container is not starting with -m 4g but works fine with -m 3g
  • Docker: trouble connecting to mysql, network issue?
  • How to redirect from the main domain to a subdomain in Cloudron?
  • How to set UIDs for official Docker images?
  • Exploring Docker container's file system
  • Docker login from cmd line yields i/o timeouts
  • gitlab-runner with docker executor cannot find official images like maven:3.3.9-jdk-8
  • One Solution collect form web for “Kubernetes : hostname regex failed”

    You could use a different name other than the hostname with the --api-external-dns-names as described in the reference manual. E.g.:

    kubeadm init --api-external-dns-names=kube.local

    This should run just fine.

    You could also change the hostname of your machine – you’ll find plenty of ways to do that on SO too.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.