Skip to content

Instantly share code, notes, and snippets.

@daemonfire300
Created February 20, 2025 15:47
Show Gist options
  • Save daemonfire300/c442a0c1d2025971ced21cc8866b67d1 to your computer and use it in GitHub Desktop.
Save daemonfire300/c442a0c1d2025971ced21cc8866b67d1 to your computer and use it in GitHub Desktop.
Example Split PEM
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