Created
December 10, 2024 12:38
-
-
Save dapi/7ef92f64eb127f2692f00fb67ecb2d49 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env sh | |
K8S_USER="${K8S_USER:-$USER}" | |
PRIVATE_KEY=${K8S_USER}.key | |
CSR=${K8S_USER}.csr | |
echo "Generate private key for ${K8S_USER}" | |
openssl genpkey -out ${PRIVATE_KEY} -algorithm Ed25519 | |
openssl req -new -key ${PRIVATE_KEY} -out ${CSR} -subj "/CN=${K8S_USER},/O=safeblock.com" | |
echo "Done." | |
echo "You next steps are:" | |
echo "1. Save somewhere private key ${PRIVATE_KEY}" | |
echo "2. Send this CSR to your k8s admin:" | |
cat ${CSR} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment