kubernetes minion not registering with api server on openstack, hostname being rejected

161 Views Asked by At

I start the kubelet with

--cloud-provider=openstack and --cloud-config=openstack.conf and --hostname-override=192.168.1.136

and get this in the kubelet log:

Unable to register node "pn-kube-minion_1-du27gtypmboj" with API server: Node "pn-kube-minion_1-du27gtypmboj" is invalid: metadata.name: Invalid value: "pn-kube-minion_1-du27gtypmboj": must match the regex a-z0-9?(.a-z0-9?)* (e.g. 'example.com')

looks like hostname-override is being ignored and it's pulling the hostname info from the vm instead (I believe this is to satisfy cinder volume mounting)

Is this a known issue? Any work-arounds?

1

There are 1 best solutions below

2
On BEST ANSWER

Does this help? https://github.com/kubernetes/kubernetes/issues/22984

For nodeName, hostname-override will be ignored if you are using cloud provider, we will use the node name determined by your cloud provider to register the node with apiserver.