Skip to content
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

Not able to generate .p12 certificates by cert-manager #6884

Open
yashjain10038 opened this issue Apr 5, 2024 · 1 comment
Open

Not able to generate .p12 certificates by cert-manager #6884

yashjain10038 opened this issue Apr 5, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@yashjain10038
Copy link

Describe the bug:
Need to generate .p12 certificate by cert-manager. I'm using the below Yaml from cert-manager documentation.

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: example-com
  namespace: devtest
spec:
  secretName: example-com-tls
  duration: 2160h # 90d
  renewBefore: 360h # 15d
  subject:
    organizations:
      - pointsbet
  commonName: zxc.devtest.domain.com
  isCA: false
  privateKey:
    algorithm: RSA
    encoding: PKCS1
    size: 2048
  usages:
    - server auth
    - client auth
  # At least one of a DNS Name, URI, IP address or otherName is required.
  dnsNames:
    - zxc.devtest.domain.com
  issuerRef:
    name: letsencrypt-production
    kind: Issuer
    group: cert-manager.io
  # keystores allows adding additional output formats. This is an example for reference only.
  keystores:
    pkcs12:
      create: true
      passwordSecretRef:
        name: azure-store
        key: password

Expected behaviour:
It should give the secret with name example-com-tls with cert.p12 certificate in it.

Error:
I'm getting below error in Certificate CRD -
Issuing certificate as Secret does not exist

Environment details::

  • Kubernetes version: v1.27.9
  • Cloud-provider/provisioner: AKS
  • cert-manager version: v1.13.5
  • Install method: e.g. helm/static manifests: HELM

/kind bug

@jetstack-bot jetstack-bot added the kind/bug Categorizes issue or PR as related to a bug. label Apr 5, 2024
@schedin
Copy link

schedin commented Apr 23, 2024

I don't think Issuing certificate as Secret does not exist is an error message. Instead I think it is the start trigger to begin the generation process. You might have some other error message the indicate what the problem is?

For reference it works for me (using cert-manager 1.14). See #6783 (comment) but use a password like password1234 instead of empty string that I used in that example. I get the pkcs12 file(s):

$ kubectl describe secret -n mynamespace my-certificate-secret | tail -n5
ca.crt:          1192 bytes
keystore.p12:    3287 bytes
tls.crt:         1143 bytes
tls.key:         1675 bytes
truststore.p12:  1170 bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

3 participants