Create a DNS resource
Prerequisites
- You have a running MAAS installation.
- You have administrative access to MAAS.
- You have at least one domain set up in MAAS.
Identify your domain
Each DNS resource needs a domain. You can find available domains in MAAS by running:
maas admin domains read
Look for the id
or name
of the domain you want to use.
Choose a hostname
Decide on the hostname for the new DNS record. You can either:
- Provide a fully qualified domain name (FQDN), e.g.,
webserver.example.com
- OR specify the
name
(hostname only) and thedomain
separately.
Assign an IP address (optional)
If you want to create an A (IPv4) or AAAA (IPv6) record, you need an IP address:
maas admin ipaddresses read
This lists available IP addresses in MAAS.
Create the DNS resource
Run the following command:
maas admin dnsresources create name=webserver domain=example.com ip_addresses=192.168.1.100
Alternatively, using an FQDN:
maas admin dnsresources create fqdn=webserver.example.com ip_addresses=192.168.1.100
This creates an A record for webserver.example.com
pointing to 192.168.1.100
.
Verify the DNS resource
List all DNS resources:
maas admin dnsresources read
Ensure your new entry appears in the output.