Everyone is focussed on DNS vs IP when the real question is about microservice architecture intercommunication
I.e. there's no public internet addressing
Ergo you may never need a DNS record to have microservices communicate because they may reside within the same domain so forcing DNS where it isn't needed will add unnecessary complexity.
Microservices commonly communicate over local IP address ranges if they even leave the host. Many answers include containers in thier answers meaning the communication may never even leave a server host (never traverse a network cable)
Even a Kubernetes node with many pods fits this description, and DNS is completely optional in Kubernetes contrary to the other answers.
Needless to say that even when communicating over an actual network occurs, it may never traverse the internet.
Even when DNS is used, regardless of the networking situation, there's little benefit of a DNS record if server IP addresses are static.
So ask yourself is the server static?
Do the microservices communicate over a network?
Over the internet?
Is the DNS record management routed over the internet?
Should the microservice be reachable using the public internet reachable DNS records?
Are the DNS records managed on an internal DNS resolver? If the microservices must remain inaccessible from the internet this is a requirement for DNS to be an option
And using DNS isn't required for multiple services using a single IP, that's just a lack of understanding in other answers. Kubernetes node is a single host, 1 IP, and many pods can respond from that 1 host and single IP even when not using DNS because containers are addressible using network overlays (similar concept to the NAT router you have at home allows many devices to work behind your 1 IP address given to you by the ISP)
There's also the concept of SNI in the TLS communication that will help you run many services behind a single IP, because TLS is using TCI/IP it is already unaware of DNS and yet it works (due to SNI, not DNS).
Service meshes and reverse proxy (like a load balancer) are other options that sometimes ise DNS but can also work with URL paths on the same single IP address or single domain but many microservices behind it