A Kubernetes operator designed to manage Certificate resources by interfacing with the Cert API.
It automates the process of obtaining and renewing TLS certificates from Cert and managing them as Kubernetes secrets.
- TLS Secret creation: Automatically creates a
secretof typetlsin the requested name and namespace. Thetls.crtandtls.keyare extracted from theCertificateobtained fromCert. - Automatic Certificate Renewal: Automatically renews
TLS Certificatesbefore they expire, ensuring continuous security for your applications.
- Manages specifications for creating certificates.
- Contains details about the certificate's validity period (
validFromandvalidTo) and the current state of the certificate. - Provides insights into the certificate's signature
hash algorithm, andGUID.
Note: The fields in the Spec are all optional, not all have to be specified.
apiVersion: cert.dana.io/v1alpha1
kind: Certificate
metadata:
name: certificate-sample
spec:
certificateData:
subject:
commonName: "example"
country: "ex"
state: "example"
locality: "example"
organization: "example"
organizationUnit: "example"
san:
dns:
- "www.example.com"
ips:
- "192.168.1.1"
template: "default"
form: pfx
configRef:
name: "certificateconfig-sample"
secretName: my-secret-new- Stores configuration details required for interacting with the external
CertAPI service. - Specifies settings such as
daysBeforeRenewalandwaitTimeout, which affect interaction with the externalCertAPI.
apiVersion: cert.dana.io/v1alpha1
kind: CertificateConfig
metadata:
name: certificateconfig-sample
spec:
secretRef:
name: cert-credentials
namespace: default
daysBeforeRenewal: 7
waitTimeout: 5mThe Secret has a single key - credentials and contains a json with the needed keys, as specified below:
apiVersion: v1
kind: Secret
metadata:
name: cert-credentials
namespace: default
type: Opaque
stringData:
credentials: |
{
"apiEndpoint": "https://cert.com/cert-route/",
"token": "jwt-token",
"downloadEndpoint": "/down"
}- A Kubernetes cluster (you can use KinD).
$ make prereq$ make deploy IMG=ghcr.io/dana-team/certificate-operator:<release>$ make docker-build docker-push IMG=<registry>/certificate-operator:<tag>