if you need to force the renewal of your certificates with cert-manager (under kubernetes), (possibly due to the 2020.02.29 CAA Rechecking Bug ), then you can delete the certificate in your kubernetes cluster and cert-manager will get a new one (tested with cert-manager 0.9.1).
The certificate will be in a kubernetes secret. Take care not to remove the wrong secret: there can be multiple secrets of the same name in different namespaces! Before deleting the secret you can have a look at it with kubectl get secret name_of_your_secret -o yaml. It should have an entry named tls.crt which is the certificate that was issued to you by letsencrypt.
If someone could report here on how one can display/decode the cert contained in the value of the tls.crt key, that would be extra useful!
The code snippet you suggest will retrieve all secrets, however in the end only one certificate will be output… I suggest to instead to qualify the secret to retrive with both the namespace and the secret name, then you know what you’re getting:
This didn’t work in my case - I ended up going with setting the renewBefore field in the certificate spec to a value that would cause a certificate renewal: