简体   繁体   中英

Assign domain name to a floating ip

I want to assign a domain name to an internal openstack floating ip, to access the instance over the internet.

I checked that you can set dnsmasq_dns_servers = 1.1.1.1 and configure dhcp_agent.ini accordingly, it seems to be a step in the right direction, but i couldn't find a way to allocate domain name to openstack instance (via horizon or cli).

The dnsmasq server that is managed by the DHCP agent is used to implement DHCP in subnets where DHCP is enabled. It does not resolve hostnames. If you want to be able to resolve hostnames internally, you could look into running a DNS server in your subnet or maintaning a hostfile on each instance that needs to communicate with the instance.

You could look at Designate. That is the DNS as a Service component of OpenStack. It is also possible to integrate Designate with an external service to manage external DNS.

See SysEleven's How to set up DNS for a Server/Website .

It walks you through the process of:

  1. Creating the zone,
  2. adding the DNS record, and finally
  3. making the zone authoritative in global DNS.

It assumes you can use the OpenStack CLI, but there's also documentation on doing the same thing with Terraform , which I'd recommend as it fully automates the entire infrastructure with infrastructure as code (IaC).

It should apply to any OpenStack provider.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM