@Yunzi Zhang Thank you for reaching out to Microsoft Q&A.
As mentioned in the Baremetal documentation, this is possible. DNS can be extended to Azure or can run completely in Azure.
Please let us know if you have any further questions and we will be glad to assist you further. Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.