-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When pod is recreated there is created a new CertificateRequest -> letsencrypts limits are exceeded very fast #75
Comments
This is as-expected. The CSI driver works by submitting a CertificateRequest to the cert-manager API, which as you've noted will result in a new Order being made with the Let's Encrypt server. Typically, users don't use the CSI driver for certificates from a public authority like this. Instead, some form of private authority (e.g. the 'CA', 'Vault', 'Venafi' or even 'selfsigned' issuer. Given the CSI driver also generates the private key data upon startup, there isn't a way you could have a single re-usable certificate between pod restarts unless the private key were also to be stored somewhere too. At that point, as you've already mentioned, you're basically doing the same as using a 'Certificate' resource and storing that keypair in a Secret. If you wanted to experiment in this space at a lower level, and possibly create your own private key & certificate distribution mechanisms, you could look at building your own CSI driver and Issuer using the csi-lib project. However this isn't something that we are aiming to support here at least. |
@munnerz Ok! Thank you for clarifications! And one more question related to cert-manager. We have a situation that we try to create an internal application, which has no outside 'Ingress', but has only 'Service' of internal Load Balancer type (i.e. we have a Load Balancer for our service, which sends traffic directly into Pod). Can we create |
Yes, though you'll need to use something like DNS01 to validate you own the domain as cert-manager relies on manipulating Ingress resources to solve HTTP01 challenges :) see https://cert-manager.io/docs/configuration/acme/dns01/ If you've got more questions, it may be best to ask your question over in the #cert-manager channel on kubernetes.slack.com, where you'll hopefully get a lot more opinions/experiences to help you along the way 😄 |
Thank you so much! :) |
Hi, we've met the following behavior:
All the time when the Pod is recreated (restarted) there is created a new CertificateRequest and Order. And it works like this even if
csi.cert-manager.io/dns-names
of the previously killed pod stays the same (i.e. we already created certificate for this domain).This behavior doesn't seem to be convenient, cause there may be necessity to recreate pod a lot of times during development and it leads to exceeding rate limits to certificate authority very fast. For example,
letsencrypt
allows to create only 50 certificates per week for one domain (https://letsencrypt.org/docs/rate-limits/).So what can we do in such a case to avoid certificate recreation all the time on pod restart? Or if we can't do anything with that, I suggest to make a feature to fix this behavior similarly to
cert-manager
way? For example in cert-manager, certificates are stored in kubernetes and if there is a new CertificateRequest for the domain, which already has certificate in K8S - it makes no real request to certificate authority and uses the one from K8S.Example of configuring
tls
volume for pod:The text was updated successfully, but these errors were encountered: