Can Hostnames be used Instead of IP Addresses for Kubernetes Nodes in the Cluster?
Problem
For BareOS clusters, traditionally, nodes within a PMK cluster displays IP addresses instead of the hostname in the NAME column.
Is there an option to use hostnames instead of IP Addresses?
Environment
Platform9 Managed Kubernetes - v5.2, K8s v1.20 and above
Answer
Starting v5.2 and K8s v1.20, users building BareOS clusters within IPv4 environments that have DNS Resolution configured for all nodes can now opt to create clusters using the Node's Hostname or IP address via U/I.
From an API perspective, the useHostname API field has been added to the cluster creation specification. Setting useHostname to true when creating a cluster will cause all nodes in the cluster to be registered using their hostname instead of IP address.
This parameter is ignored when deploying clusters on public clouds - AWS, Azure, and when deploying BareOS IPv6 clusters.
It is not possible to edit an existing cluster to start using hostnames instead of IPs.
