{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubeadm/issues/584","repository_url":"https://api.github.com/repos/kubernetes/kubeadm","labels_url":"https://api.github.com/repos/kubernetes/kubeadm/issues/584/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubeadm/issues/584/comments","events_url":"https://api.github.com/repos/kubernetes/kubeadm/issues/584/events","html_url":"https://github.com/kubernetes/kubeadm/issues/584","id":278498833,"number":584,"title":"node-name different than `hostname` not working","user":{"login":"jeffmhastings","id":1472105,"avatar_url":"https://avatars1.githubusercontent.com/u/1472105?v=4","gravatar_id":"","url":"https://api.github.com/users/jeffmhastings","html_url":"https://github.com/jeffmhastings","followers_url":"https://api.github.com/users/jeffmhastings/followers","following_url":"https://api.github.com/users/jeffmhastings/following{/other_user}","gists_url":"https://api.github.com/users/jeffmhastings/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffmhastings/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffmhastings/subscriptions","organizations_url":"https://api.github.com/users/jeffmhastings/orgs","repos_url":"https://api.github.com/users/jeffmhastings/repos","events_url":"https://api.github.com/users/jeffmhastings/events{/privacy}","received_events_url":"https://api.github.com/users/jeffmhastings/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-01T15:21:06Z","updated_at":"2018-03-28T16:13:15Z","closed_at":null,"author_association":"NONE","body":"<!-- Thanks for filing an issue! Before hitting the button, please answer these questions.-->\r\n\r\n## Is this a request for help?\r\n\r\nYes. I posted a question on slack but received no response.\r\n\r\n## What keywords did you search in kubeadm issues before filing this one?\r\n\r\n\"node-name\", \"Unable to register node\"\r\n\r\n## Is this a BUG REPORT or FEATURE REQUEST?\r\n\r\nBUG REPORT\r\n\r\n<!--\r\nIf this is a BUG REPORT, please:\r\n  - Fill in as much of the template below as you can.  If you leave out information, we can't help you as well.\r\n\r\nIf this is a FEATURE REQUEST, please:\r\n  - Describe *in detail* the feature/behavior/change you'd like to see.\r\n\r\nIn both cases, be ready for followup questions, and please respond in a timely\r\nmanner.  If we can't reproduce a bug or think a feature already exists, we\r\nmight close your issue.  If we're wrong, PLEASE feel free to reopen it and\r\nexplain why.\r\n-->\r\n\r\nWhen I run `kubeadm init` using the `nodeName` configuration option or `--node-name` command line flag I end up in a state where `kubeadm init` fails to complete.\r\n\r\nhostname:\r\n```\r\nip-x-x-x-x\r\n```\r\n\r\nkubeadm command:\r\n```\r\nkubeadm init --node-name ip-x-x-x-x.ec2.internal\r\n```\r\n\r\nkubeadm output:\r\n```\r\n[root@ip-x-x-x-x ~]# kubeadm init --node-name ip-x-x-x-x.ec2.internal\r\n[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.\r\n[init] Using Kubernetes version: v1.8.4\r\n[init] Using Authorization modes: [Node RBAC]\r\n[preflight] Running pre-flight checks\r\n[preflight] Starting the kubelet service\r\n[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)\r\n[certificates] Generated ca certificate and key.\r\n[certificates] Generated apiserver certificate and key.\r\n[certificates] apiserver serving cert is signed for DNS names [ip-x-x-x-x.ec2.internal kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.x.x.x]\r\n[certificates] Generated apiserver-kubelet-client certificate and key.\r\n[certificates] Generated sa key and public key.\r\n[certificates] Generated front-proxy-ca certificate and key.\r\n[certificates] Generated front-proxy-client certificate and key.\r\n[certificates] Valid certificates and keys now exist in \"/etc/kubernetes/pki\"\r\n[kubeconfig] Wrote KubeConfig file to disk: \"admin.conf\"\r\n[kubeconfig] Wrote KubeConfig file to disk: \"kubelet.conf\"\r\n[kubeconfig] Wrote KubeConfig file to disk: \"controller-manager.conf\"\r\n[kubeconfig] Wrote KubeConfig file to disk: \"scheduler.conf\"\r\n[controlplane] Wrote Static Pod manifest for component kube-apiserver to \"/etc/kubernetes/manifests/kube-apiserver.yaml\"\r\n[controlplane] Wrote Static Pod manifest for component kube-controller-manager to \"/etc/kubernetes/manifests/kube-controller-manager.yaml\"\r\n[controlplane] Wrote Static Pod manifest for component kube-scheduler to \"/etc/kubernetes/manifests/kube-scheduler.yaml\"\r\n[etcd] Wrote Static Pod manifest for a local etcd instance to \"/etc/kubernetes/manifests/etcd.yaml\"\r\n[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory \"/etc/kubernetes/manifests\"\r\n[init] This often takes around a minute; or longer if the control plane images have to be pulled.\r\n[apiclient] All control plane components are healthy after 29.501696 seconds\r\n[uploadconfig] Storing the configuration used in ConfigMap \"kubeadm-config\" in the \"kube-system\" Namespace\r\n[markmaster] Will mark node ip-x-x-x-x.ec2.internal as master by adding a label and a taint\r\ntimed out waiting for the condition\r\n```\r\n\r\nrelevant kubelet logs:\r\n```\r\nDec 01 15:07:06 ip-10-x-x-x kubelet[16229]: I1201 15:07:06.858910   16229 kubelet_node_status.go:83] Attempting to register node ip-10-x-x-x\r\nDec 01 15:07:06 ip-10-x-x-x kubelet[16229]: E1201 15:07:06.860760   16229 kubelet_node_status.go:107] Unable to register node \"ip-x-x-x-x\" with API server: nodes \"ip-x-x-x-x\" is forbidden: node \"ip-x-x-x-x.ec2.internal\" cannot modify node \"ip-x-x-x-x\"\r\n```\r\n\r\n## Versions\r\n\r\n**kubeadm version** (use `kubeadm version`): kubeadm version: &version.Info{Major:\"1\", Minor:\"8\", GitVersion:\"v1.8.4\", GitCommit:\"9befc2b8928a9426501d3bf62f72849d5cbcd5a3\", GitTreeState:\"clean\", BuildDate:\"2017-11-20T05:17:43Z\", GoVersion:\"go1.8.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n\r\n**Environment**:\r\n- **Kubernetes version** (use `kubectl version`): 1.8.4\r\n- **Cloud provider or hardware configuration**: ec2 instance - not specifying cloud provider\r\n- **OS** (e.g. from /etc/os-release): CentOS Linux 7 (Core)\r\n- **Kernel** (e.g. `uname -a`): Linux ip-x-x-x-x 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux\r\n- **Others**:\r\n\r\n\r\n## What happened?\r\n\r\nKubeadm init times out. Errors in kubelet logs about not being able to register node `<hostname>` even though I'm setting `<nodeName>`\r\n\r\n## What you expected to happen?\r\n\r\nKubeadm init completes using the nodeName I set.\r\n\r\n## How to reproduce it (as minimally and precisely as possible)?\r\n\r\nSpin up ec2 instance in a VPC that has a private DNS zone (i.e. not ec2.internal). `hostname` should be ip-x-x-x-x. Install kubeadm 1.8.4 and run kubeadm init setting node-name to the fqdn ip-x-x-x-x.ec2.internal.\r\n\r\n## Anything else we need to know?\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubeadm/issues/comments/376944831","html_url":"https://github.com/kubernetes/kubeadm/issues/584#issuecomment-376944831","issue_url":"https://api.github.com/repos/kubernetes/kubeadm/issues/584","id":376944831,"user":{"login":"samcorzine","id":24443375,"avatar_url":"https://avatars1.githubusercontent.com/u/24443375?v=4","gravatar_id":"","url":"https://api.github.com/users/samcorzine","html_url":"https://github.com/samcorzine","followers_url":"https://api.github.com/users/samcorzine/followers","following_url":"https://api.github.com/users/samcorzine/following{/other_user}","gists_url":"https://api.github.com/users/samcorzine/gists{/gist_id}","starred_url":"https://api.github.com/users/samcorzine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samcorzine/subscriptions","organizations_url":"https://api.github.com/users/samcorzine/orgs","repos_url":"https://api.github.com/users/samcorzine/repos","events_url":"https://api.github.com/users/samcorzine/events{/privacy}","received_events_url":"https://api.github.com/users/samcorzine/received_events","type":"User","site_admin":false},"created_at":"2018-03-28T16:13:15Z","updated_at":"2018-03-28T16:13:15Z","author_association":"NONE","body":"Could you clarify a bit about the Kubelet command? I'm facing the same issue and but it seems if I run the kubelet --hostname-override command in advance that fails as well. I feel like I'm missing something simple here. "}}
{"actor":{"display_login":"samcorzine"}}