Skip to content

Instantly share code, notes, and snippets.

@brakmic
Created April 27, 2023 10:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brakmic/8198e380e90c9736a43f78275b60eadf to your computer and use it in GitHub Desktop.
Save brakmic/8198e380e90c9736a43f78275b60eadf to your computer and use it in GitHub Desktop.
How to create TLS key and cert the easy way
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=localhost"
kubectl create secret tls SECRET_NAME-secret --namespace YOUR_NAMESPACE --key tls.key --cert tls.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment