Skip to main content

Create Certificate

The certificate can be created as a cert-manager Certificate resource that will be automatically managed by the CZERTAINLY Issuer by specifying the issuerRef field.

Certificate resource

You can find more information about the Certificate resource in the cert-manager Certificate resource guide.

Issue Certificate from CZERTAINLY Issuer

The following is an example of the Certificate resource:

apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: czertainly-crt
spec:
secretName: czertainly-crt-secret
dnsNames:
- foo.example.com
- bar.example.com
issuerRef:
name: czertainly-issuer
kind: CzertainlyIssuer
group: czertainly-issuer.czertainly.com

To create the Certificate, save the resource definition to a file and apply it to the Kubernetes cluster:

kubectl apply -f czertainly-crt.yaml

You can get all available CZERTAINLY Certificate resources by running:

kubectl get certificates.cert-manager.io -o json | jq

To list all the certificates issued by the CZERTAINLY Issuer, you can run:

kubectl get certificates.cert-manager.io \
-o json \
| jq '.items[] | select(.spec.issuerRef.name == "czertainly-issuer")'