I am creating a Certificate resource for cert manager with the following Resource definition
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: app-example-cert
namespace: nginx-test
spec:
secretName: app-example-cert
issuerRef:
kind: ClusterIssuer
name: http-01-staging
dnsNames:
- app.example.com
when I do kubectl describe certificate I get the message as Stored new private key in temporary Secret resource "app-example-cert-dbd6h"
how to specify the secret name so that that it doesn't add -dbd6h
to the end of the certificate
The -dbd6h
suffix is for a temporary secret used during certificate issuance.
Cert-Manager will save the final certificate to the secretName you specified (app-example-cert).
You actually don’t need to change anything as the temporary secret will be deleted after the process is complete.
You can verify the final certificate with:
kubectl get secret -n nginx-test app-example-cert
It might also be helpful to check the cert-manager
pod for any errors, if your Certificate resource is actually not getting created.
Also, here is a similar issue, if it helps -> https://github.com/cert-manager/cert-manager/issues/5236