How is kubernetes node name set?

603 views
Skip to first unread message

Dhawal Patel

unread,
Oct 16, 2015, 5:49:27 PM10/16/15
to kubernetes-dev
I'm trying to get past the issue mentioned here:

I have a Kubernetes cluster in AWS running on CoreOS. We have DHCP options set on our VPC which changes the domain to xyz.abc.com. The issue is when aws cloud provider tries to lookup the instance, it tries to lookup by matching ec2's private-dns-name property with the hostname. The private-dns-name uses region.compute.internal domain and my node domain is xyz.abc.com, so the lookup always fails. I'm trying to get past this problem by setting my hostname to match the aws private-dns-name. Before i start kubelet, I change the hostname to have the correct domain (region.compute.internal). However, kubelet always ends up using xyz.abc.com. I have no idea where kubelet is getting this domain. I check /etc/hostname and /etc/resolv.conf  and both places the domain name is region.compute.internal. Can someone please help we set the correct nodeName so I can get aws cloud provider to work.

Thanks 

Vedran Lerenc

unread,
Mar 14, 2017, 5:07:48 AM3/14/17
to Kubernetes developer/contributor discussion

I would be interested as well, but for other reasons. We have deployed a second cluster into the same account in the same region and by accident we noticed that two machines had the same private DNS name. That's possible and not surprising, as we have separate VPCs and no intentions of peering them (multiple similar DEV clusters that should work in isolation).

Everything worked nice until we saw a clash while trying to locate the instance to which a PV should be attached. The instance was searched for in AWS by its private DNS name which returned multiple hits (sure thing, no need to be unique across different SDNs/VPCs). That seemed odd (not to say wrong), so we thought is there a way to change/influence this behavior?

Andy Goldstein

unread,
Mar 20, 2017, 9:09:12 AM3/20/17
to Vedran Lerenc, Kubernetes developer/contributor discussion

On Tue, Mar 14, 2017 at 5:07 AM, Vedran Lerenc <vle...@gmail.com> wrote:

I would be interested as well, but for other reasons. We have deployed a second cluster into the same account in the same region and by accident we noticed that two machines had the same private DNS name. That's possible and not surprising, as we have separate VPCs and no intentions of peering them (multiple similar DEV clusters that should work in isolation).

Everything worked nice until we saw a clash while trying to locate the instance to which a PV should be attached. The instance was searched for in AWS by its private DNS name which returned multiple hits (sure thing, no need to be unique across different SDNs/VPCs). That seemed odd (not to say wrong), so we thought is there a way to change/influence this behavior?

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/627ee4ff-9b70-464e-af3d-943d61fbe736%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages