Copy file from https://raw.githubusercontent.com/joohoi/acme-dns-certbot-joohoi/master/acme-dns-auth.py to /etc/letsencrypt/acme-dns-auth.py and change user to root and chmod to 0755.
Also adjust script to appropriate python version.
domain="example.com"
sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d \*."$domain" -d "$domain"
Then simply add record to DNS system, and continue execution of script.
Single domain issuing using DNS TXT records
certbot certonly --rsa-key-size 4096 --manual --preferred-challenges dns --debug-challenges -d example.com