// KubeNodeID returns the identity of the node within the kubernetes cluster (kubectl get node)
// when running on a cloud environment such as AWS, kubelet tends to pick up it's hostname from the cloud provider API.
// So when running on these environments, we should ensure our hostnames match what kubernetes will be doing.
// When not running on a cloud environment with this behaviour, we will identify nodes by their Advertise IP address
// More Information:
// https://github.com/kubernetes/kubernetes/pull/58114#pullrequestreview-88022039
// https://github.com/kubernetes/kubernetes/issues/54482
// https://github.com/kubernetes/kubernetes/issues/58084
KubeNodeID returns the identity of the node within the kubernetes cluster (kubectl get node)
when running on a cloud environment such as AWS, kubelet tends to pick up it's hostname from the cloud provider API.
So when running on these environments, we should ensure our hostnames match what kubernetes will be doing.
// KubeNodeID returns the identity of the node within the kubernetes cluster ( kubectl get node ) // when running on a cloud environment such as AWS kubelet tends to pick up it ' s hostname from the cloud provider API . // So when running on these environments we should ensure our hostnames match what kubernetes will be doing . // When not running on a cloud environment with this behaviour we will identify nodes by their Advertise IP address // More Information : // https : // github . com / kubernetes / kubernetes / pull / 58114#pullrequestreview - 88022039 // https : // github . com / kubernetes / kubernetes / issues / 54482 // https : // github . com / kubernetes / kubernetes / issues / 58084
func (s *Server) KubeNodeID() string {
	if s.Nodename != "" {
		return s.Nodename
	}
	return s.AdvertiseIP
}
func ( s * Server ) KubeNodeID ( ) string { if s . Nodename != " " { return s . Nodename } return s . AdvertiseIP }
KubeNodeID returns the identity of the node within the kubernetes cluster (kubectl get node)
when running on a cloud environment such as AWS, kubelet tends to pick up it's hostname from the cloud provider API.
KubeNodeID returns the identity of the node within the kubernetes cluster ( kubectl get node ) when running on a cloud environment such as AWS kubelet tends to pick up it ' s hostname from the cloud provider API .