Key2PFX is a lightweight Docker-based utility that securely converts TLS certificates (tls.crt, tls.key, ca.crt) from cert-manager or other certificate providers into a .pfx file, suitable for consumption by .NET applications.
To use the latest production version, pull the image from GitHub Container Registry:
docker pull ghcr.io/thaitype/key2pfx:latestThis image is built specifically for linux/amd64 architecture and is ready to be used as part of your certificate automation workflow, such as scheduled Kubernetes CronJobs before certificate expiration.
The image contains a simple yet secure conversion mechanism built on Alpine Linux and OpenSSL. At runtime, it:
-
Reads certificate files from mounted volumes or default paths:
tls.crt– Public certificatetls.key– Private keyca.crt– Certificate authority chain (optional)
-
Converts them into a single
.pfx(PKCS#12) bundle usingopenssl pkcs12 -export. -
Outputs the resulting
.pfxfile to a configurable location, with an optional password.
All key parameters such as input paths, output location, and password are configurable via environment variables, allowing seamless integration with Kubernetes secrets and automation workflows.
Key2PFX follows a clear and controlled branching model:
latestbranch
This branch is automatically built and published as thelatestimage in the container registry for internal testing and integration.