In MAAS, a domain represents a DNS zone managed within MAAS. Domains allow MAAS to provide internal name resolution, ensuring that deployed machines and services can be accessed using meaningful hostnames instead of IP addresses.
Purpose in MAAS
Domains in MAAS serve several key functions:
- DNS Management – MAAS can assign and resolve hostnames within managed domains.
- Network Segmentation – Different domains can be used for different environments (e.g., production vs. testing).
- Custom Hostname Assignments – Machines can be assigned FQDNs based on domain settings.
- External DNS Integration – MAAS can delegate DNS control or sync with external DNS providers.
Scope & behavior in MAAS
- Domains apply to machine hostnames – Every machine in MAAS is assigned a domain.
- MAAS supports multiple domains – Each VLAN/subnet can be associated with a different domain.
- DNS entries are dynamically updated – Machines registered in MAAS automatically get an A (IPv4) and AAAA (IPv6) record in the assigned domain.
- Default domain – MAAS uses a built-in domain (
maas
) unless custom domains are configured.
Key considerations
- Machines must belong to a domain – Every system in MAAS is assigned a domain by default.
- Changing a machine’s domain affects its hostname – If DNS is enabled, the FQDN will update accordingly.
- DNS conflicts can occur – If using external DNS, ensure no conflicts between MAAS and external domains.
- Default domain can be changed but not removed – MAAS always requires a default domain for DNS operations.
MAAS dnsresource objects
MAAS dnsresources and dnsresource-records manage DNS settings and records, ensuring proper network configuration.
dnsresource
dnsresource
maps fully qualified domain names (FQDNs) to IP addresses. Use the MAAS CLI to create records:
- A record (IPv4)
maas $PROFILE dnsresources create fqdn=$HOSTNAME.$DOMAIN ip_addresses=$IPV4ADDRESS
- AAAA record (IPv6)
maas $PROFILE dnsresources create fqdn=$HOSTNAME.$DOMAIN ip_addresses=$IPV6ADDRESS
dnsresource-records
dnsresource-records
manages additional DNS record types:
- CNAME (Alias)
- MX (Mail exchange)
- NS (Name server delegation)
- SRV (Service location)
- TXT (Text data, often for verification)
Examples:
- CNAME record
maas $PROFILE dnsresource-records create fqdn=alias.example.com rrtype=cname rrdata=target.example.com
- MX record
maas $PROFILE dnsresource-records create fqdn=example.com rrtype=mx rrdata='10 mail.example.com'
DNS role in MAAS
MAAS resolves hostnames to IPs for machine communication. It manages its own DNS but can also forward queries to an external upstream DNS server.
To configure an upstream DNS server:
maas $PROFILE maas set-config name=upstream_dns value=8.8.8.8
Managing dnsresource and dnsresource-records improves the speed and efficiency of DNS resolution within the MAAS network.
Last updated 22 hours ago.