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?

  • Docker for Mac Beta: Unable to link containers properly
  • Craft CMS Manager Craftman - No such file or directory: '//docker-compose.yml'
  • Can't connect to my Bluemix container (Connection: close)
  • Facing ISsue while pulling images in Docker
  • Gradle build fails in jenkins:alpine container: UnsatisfiedLinkError: linux-amd64/libnative-platform.so: libstdc++.so.6:
  • Cron job can't connect to Docker daemon
  • Reset IP counter used by docker
  • Modify NODE_ENV accordingly
  • Docker Swarm - Can’t pull from private registry
  • Adding docker to django project: no such file or directory
  • is there a way to negate a pattern in .dockerignore?
  • Installing docker containers via chef with staged files
  • 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.