As of version 1.3.7 the cert-util-operator supports alerting on expiring certs stored as secrets in the cluster so you should probably use that instead. It can also populate Routes with certs stored in secrets.
Checks SSL certificate expiration, exports as Prometheus metric and alerts when expiry is near. (I wrote this for Openshift but it should work in vanilla Kubernetes. I haven't tested it.)
Review ocp-deploy.yaml and then deploy in Openshift
oc apply -f ocp-deploy.yaml
docker pull alpha60/ssl-exporter:latest
docker run --rm -e SSL_EXPIRATION_DOMAIN=github.com -p 80:8080 ssl-exporter
In another terminal
curl localhost/metrics
SSL_EXPIRATION_DOMAIN=github.com cargo r
In another terminal
curl localhost:8080/metrics
cargo b --release
BUILD_KIT=1 docker build -t ssl-exporter .
Just add them as a comma separated list like this: SSL_EXPIRATION_DOMAIN=github.com,microsoft.com,google.com