cert-manager: Error getting keypair for CA issuer: certificate is not a CA
/kind bug
What happened:
I followed the tutorial: https://github.com/jetstack/cert-manager/blob/master/docs/user-guides/ca-based-issuer.md
After I’ve created the secret and the issuer it throws an error: Error getting keypair for CA issuer: certificate is not a CA
What you expected to happen: It reads the keypair successfully
Environment:
- Kubernetes version (use
kubectl version): 1.9 - Cloud provider or hardware configuration**: GKE
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 14
- Comments: 18 (2 by maintainers)
@whereisaaron I think that would work to, and be much easier.
It turns out that on MacOS the default OpenSSL config does not include the configuration for v3_ca certificate generation. When you follow the directions on the cert-manager site as well as most other sites which reference open ssl, they do not work. The Key for me was adding:
To the
/etc/ssl/openssl.cnffile. And then adding-extension v3_cato the open ssl cert generation. Perhaps this will help others.when on macOS, generally, alternative version of
opensslis installed viahomebrew. in that case using-config /usr/local/etc/openssl/openssl.cnfworks, without any modifications.If you don’t want to modify your
/etc/ssl/openssl.cnfyou can also just create a copy and reference it with the-configoption, like so:1. Copy Files
2. Append v3_ca options
Append the 4 lines mentioned in the comment above to your local copy using your favorite text editor.
3. Create the certificate referencing the file like so
Thanks. I avoided the error by removing the “:always”, like this :
authorityKeyIdentifier = keyid,issuer
in that case, try using “openssl” binary installed by homebrew instead, @mikereiche