This commit is contained in:
Fang-Pen Lin
2025-11-24 14:38:07 -08:00
parent 6716c5cb27
commit a497b05d88
@@ -145,9 +145,9 @@ The following steps show how to install cert-manager (using `kubectl`) and obtai
</Note> </Note>
</Step> </Step>
<Step title="Create Certificate"> <Step title="Create the Certificate">
Finally, create a `Certificate` by applying the following configuration file. Finally, request a certificate from Infisical ACME server by creating a cert-manager `Certificate` resource.
This configuration file specifies the details of the (end-entity/leaf) certificate to be issued. This configuration file specifies the details of the (end-entity/leaf) certificate to be issued.
```yaml certificate-issuer.yaml ```yaml certificate-issuer.yaml
@@ -157,24 +157,22 @@ The following steps show how to install cert-manager (using `kubectl`) and obtai
name: certificate-by-issuer name: certificate-by-issuer
namespace: <namespace_you_want_to_issue_certificates_in> namespace: <namespace_you_want_to_issue_certificates_in>
spec: spec:
# the common name for the certificate
commonName: certificate-by-issuer.example.com commonName: certificate-by-issuer.example.com
# the name of the Kubernetes Secret to create and store # name of the resulting Kubernetes Secret
# the certificate and private key in secretName: certificate-by-issuer-tls
secretName: certificate-by-issuer # total validity period of the certificate
issuerRef: duration: 48h
name: issuer-infisical # cert-manager will attempt renewal 12 hours before expiry
group: issuers.cert-manager.io renewBefore: 12h
kind: Issuer
# the algorithm and key size to use
privateKey: privateKey:
algorithm: ECDSA algorithm: ECDSA
# uses NIST P-256 curve
size: 256 size: 256
# the ttl for the certificate issuerRef:
duration: 48h name: issuer-infisical
# the time before the certificate expiry that the certificate should # use ClusterIssuer if you created a ClusterIssuer instead
# be automatically renewed kind: Issuer
renewBefore: 12h group: cert-manager.io
``` ```
The above sample configuration file specifies a certificate to be issued with the common name `certificate-by-issuer.example.com` and ECDSA private key using the P-256 curve, valid for 48 hours; the certificate will be automatically renewed by `cert-manager` 12 hours before expiry. The above sample configuration file specifies a certificate to be issued with the common name `certificate-by-issuer.example.com` and ECDSA private key using the P-256 curve, valid for 48 hours; the certificate will be automatically renewed by `cert-manager` 12 hours before expiry.