Skip to content

Instantly share code, notes, and snippets.

@lwzm
Last active January 14, 2022 07:58
Show Gist options
  • Save lwzm/a29b689d89d5bb7243db669edb156762 to your computer and use it in GitHub Desktop.
Save lwzm/a29b689d89d5bb7243db669edb156762 to your computer and use it in GitHub Desktop.
export DNSPOD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
export DNSPOD_HTTP_TIMEOUT=100000000
CMD=run
CMD=renew
N=.lego/certificates/svc.cool
if ! openssl x509 -checkend 864000 -in $N.crt; then
lego --dns dnspod --email lwzm@qq.com \
-d 'svc.cool' \
-d '*.svc.cool' \
$CMD
kubectl create secret tls lego --cert $N.crt --key $N.key --dry-run=client -o yaml | kubectl -n q apply -f -
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment