Created
February 20, 2025 15:47
-
-
Save daemonfire300/c442a0c1d2025971ced21cc8866b67d1 to your computer and use it in GitHub Desktop.
Example Split PEM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk '/-----BEGIN CERTIFICATE-----/{f++}{print > "cert" f ".pem"}' yourfile.pem && for cert in cert*.pem; do kubectl create secret tls $(basename $cert .pem) --cert=$cert --dry-run=client -o yaml | kubectl apply -f -; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment